A presentation at the OSS salon held on 2008/12/12.Read less
What is Better Specs Better Specs is a collection of best practices developers learned while testing apps that you can use to improve your coding skills, or simply for inspiration. Better Specs came to life at Lelylan (open source IoT cloud platform) and checking out its test suite may be of inspiration. Better Specs focus on Rails testing, but our goal is to create testing guidelines covering mos
ã¯ããã« RSpec 3ãæ£å¼ãªãªã¼ã¹ããã¦2ã¶æã»ã©çµéãã¾ããã(æ£å¼ãªãªã¼ã¹ã¯2014å¹´6æ) ãããã®æ å ±ãè¦ã¦ããã¨ãããã¾ã§ã¯ãæ¢åã®ãã¹ãã±ã¼ã¹ãRSpec 3ã«ã¢ããã°ã¬ã¼ããããæ¹æ³ãããRSpec 3ã§åé¤ãããããè¨æ³ãå¤ãã£ããããç¹ããªã©ããå®ãã®å§¿å¢ãã«å ¥ã£ãæ å ±ãå¤ãã£ãããã«æãã¾ãã(åèªèº«ãããããæ å ±ãããããã¢ãããã¦ãã¾ãã) ããããRSpec 3ã§ã¯ä»¥åã®ãã¼ã¸ã§ã³ã§ã¯ä½¿ããªãã£ãæ°ããæ©è½ãæ°å¤ãå°å ¥ããã¦ãã¾ãã ããã§æ¬è¨äºã§ã¯ãæ»ãã®å§¿å¢ãã§ãRSpec 3ããå°å ¥ãããæ°æ©è½ããã¾ã¨ãã¦ã¿ã¾ããã ãªããããã§ãã©ã¼ã«ã¹ããã®ã¯ãã¹ãã³ã¼ãã®æ¸ãæ¹ã«ãã¤ã¬ã¯ãã«é¢ãã£ã¦ãããããã£ã®æ°æ©è½ã§ãã 2015.01.12ï¼RSpec 3.1ã«é¢ããæ å ±ã追è¨ãã¾ãã RSpec 3.1ã«é¢ããæ å ±ã追è¨ãã¾ããã ãã¨ãã¨ç´¹ä»ãã¦ããæ°æ©
Rspec/Capybara/Turnipã®å ¥éè¨äºãå ¨åã§ã¾ã¨ãã¦ã¿ã Aug 30th, 2013 Tweet ãã£ããã The Rspec Bookããèªã¿çµãã¾ãããåãã®æ¬ã§ãããRspecãCucumberãWebratãSeleniumãªã©ãæ´»ç¨ããããã®ãã¦ãã¦æºè¼ã§å¤§æºè¶³ã§ããï¼ ã¨ãããã¨ã§ããã®æ¬ã§èªãã å 容ãå¿ããªãããã«ããããã¨ããã®éç¨ã§Rspec/Capybaraãªã©ã®ãããè³æããã¤ããã®ã§ãã¾ã¨ããããã«ãã®è¨äºãæ¸ãã¾ãããããééããçºè¦ããå ´åãä»ã«ããããªã½ã¼ã¹ãããã°ãæ¯éã¡ãã»ã¼ã¸ãé¡ããã¾ãï¼ ãã¹ãé§åéçº(TDD)ã¨æ¯ãèãé§åéçº(BDD) ãã¹ãé§åéçº(TDD)ã¨ã¯ãã³ã¼ããæ¸ãéã«æåã«ãã¹ããæ¸ãã次ã«ãã¹ããéãæä½éã®ã³ã¼ããæ¸ãããã®å¾ã«ãªãã¡ã¯ã¿ãªã³ã°ãã¦ããéçºææ³ã§ããä¸æ¹ã§æ¯ãèãé§åéçº(BDD)ã¯TDDã®çº
2012å¹´04æ19æ¥ æè¿ãæ°äººã®ãã¹ãã³ã¼ããè¦ãæ©ä¼ããããã¦ããããã¹ãã®æ¸ãæ¹ã«ã¤ãã¦èããæ©ä¼ããã£ããã¦ããããã¹ãã¯ãã³ãã¬ã¼ãã¿ãããªãã®ãããã®ã§ãããããæ¼ãããã°ã誰ã§ãç°¡åã«æ¸ããã¨ãã§ããã ããã§ã¯ããã®æ¹æ³ã«ã¤ãã¦ç´¹ä»ãããããµã³ãã«ã¯RSpecã§æ¸ããããã®ä»ã®ã¦ããããã¹ããã¬ã¼ã ã¯ã¼ã¯ã§ããå¿ç¨ãã§ããã¨ãããã ã¯ããã«ããåç´åããã¨ããã¹ã対象ã¯ç¶æ ãæã¡ãå ¥åãä¸ããã¨ä½ããã®åºåãè¡ãªããã®ã§ãããå ¥åãå¤ããã°åºåã¯å¤åããããç¶æ ãå¤åããã¨å ¥åãåãã§ãåºåãå¤ããï¼ãããããªãï¼ã ã¦ããããã¹ãã¯ããã¹ã対象ã®ç¶æ ãæä½ããä¸ããå ¥åã«ãã£ã¦æå³éãã®åºåãå¾ããããã確èªããä½æ¥ã®ãã¨ãããããªã®ã§ãã¦ããããã¹ããæ¸ãã¨ãã«ã¯ããªãã¸ã§ã¯ãã®ç¶æ ãã¨ã«ã¡ã½ããåä½ã§å ¥åã¨åºåã確èªããããã«ããã RSpecã®çä¼¼ã³ã¼ãã§æ¸ãã¨
ããã¯ã¼ã§ã! RSpec 㧠pending 使ã£ã¦ãã¹ããä¸æçã«ç¡å¹åããäºããæ¹ã¯å¤§å¢ããã£ãããããããªãã§ãããã! ãªãããã®äºæ ã§ä¸æçã« pending ããããå¾ãªãç¶æ³ãªãã¨ããããpending ãããªã責任ããã£ã¦è©²å½ã®ãã¹ããæ²»ãããããããä¸è¦ãªãæ¶ããªã©ã¨ãã£ã対å¦ããã¦ããããããã®ã§ãã! ã§ããå®éæ¥é±ã¾ã§ã«ã¯!ã¨ãè¨ã£ã¦ãæ¾ç½®ãã人éããããããç´ãã1å¹´,2年以ä¸æ¾ç½®ãããäºããã°ãã°ããã®ãç¾å®ã§ãâ¦â¦â¦ pending ãæ¾ç½®ããäºã«ãã£ã¦ãå®ã¯ããã¯(ä»ã®äººã«ã¨ã£ã¦)ããªãéè¦ãªãã¹ãã§ããããªãã¹ããpendingããã¦ã訳ãªãã¨æã£ããä»ã®ã¡ã³ãã¼ã«ããå¤æ´ã§å®ã¯ãã®ãã¹ããã³ã±ã¦äºæ ã£ã¦ããã¨ããå¯è½æ§ãåå¨ããããã§ãã éè¦ãªãã¹ããAããã pending ãã (ããã¹ãã¯è¿½ã£ã¦ä¿®æ£ãããã¿ãããªæãã§) æ¯è¼ç大ããã®å¤æ´ã
(注: 以ä¸ã®å 容ã¯ãRSpec ã¦ã¼ã¶ã®éã§åºã¾ã£ã¦ãããã¨ã§ããªãããã¡ãã RSpec éçºãã¼ã ã®å ¬å¼ãªè¦è§£ã§ããªããããã¾ã§ã¯ã·ã®å人çãªè¦è§£ã§ãã) RSpec ã®ãããã¨ããã¯ãã³ã¼ãã«å¯¾ãã¦ã§ã¯ãªãä»æ§ã«å¯¾ãã¦ãã¹ããæ¸ããã¨ãæ確ã«ãããã¨ã ã¨æããä½ãä»ããã¨è¨ããããã ãã©ãä»ããã«ãªã£ã¦ããããæ°ã¥ãããã¯ããªé ã§ãã¾ããã£ãã ã¯ã·ãæåã¯ããassert_equal(expected, actual)ãã®ãããã«ãactual.should == expectedãã¨æ¸ããã£ãããã«ç®ã奪ããã¦ããã¹ãã³ã¼ããèªç¶è¨èªã«è¿ãå½¢ã§è¨è¿°ããã®ã RSpec ã®ãããã¨ããã ã¨åéããã¦ãããããããTDD (Test Driven Development)ããããBDD (Behaviour Driven Development)ãã¸ã¨ããæ°ããæ½®æµã ã¨åéããã¦ã
If you need to automatically test a user interface, this book is for you. Whether itâs Windows, a Java platform (including Mac, Linux, and others) or a web app, youâll see how to test it reliably and repeatably. Many automated test frameworks promise the world and deliver nothing but headaches. Fortunately, youâve got a secret weapon: Ruby. Ruby lets you build up a solution to fit your problem, ra
åç° å人(@t_wada) ä½ãRSpec ã®å ¥éã¨ãã®ä¸æ©å ã¸ã第2ã¤ãã¬ã¼ã·ã§ã³ãã¯ã¯ãªã¨ã¤ãã£ãã»ã³ã¢ã³ãº 表示 - ç¶æ¿ 4.0 å½é ã©ã¤ã»ã³ã¹ã§æä¾ããã¦ãã¾ãã #coffee.rb ã®åçµä¼ã«æããã(ã¨ããããã¯æ¼ãããã?)ã®ã§ãå æ¥ã® RSpec ãã¥ã¼ããªã¢ã«ã®ç¶ããè¨ãã¾ãããã®ã¨ã³ããªã¯åçµä¼ã«åå ããªããã®ã©ã¤ãæ´æ°ã§ããã (æ´æ°) 第3ã¤ãã¬ã¼ã·ã§ã³ãæ¸ãã¾ãããç¶ãã«èå³ããæ¹ã¯ã覧ä¸ãã ååçµäºæç¹ã®ã³ã¼ãã¨å®è¡çµæ ååçµäºæç¹ã§ã®ã³ã¼ãã以ä¸ã«è¨ãã¾ãã message_filter.rb class MessageFilter def initialize(word) @word = word end def detect?(text) text.include?(@word) end end message_filter_spec.rb r
æ¬ã®ç´¹ä»ç¬¬2å¼¾ãå°ãåãTwitterä¸ã§TDD/BDDã«ã¤ãã¦çãä¸ãã£ã¦ããã®ã§ããã®æ¬ãç´¹ä»ãã¦ã¿ãããªã£ãã ãThe Rspec Book: Behaviour Driven Development With Rspec, Cucumber, and Friendsãã¨ããæ¬ã ãã®æ¬ã¯ãRspecã¨Cucumberã使ããã©ãèããã©ãã·ã¹ãã ãä½ã£ã¦ããããã¨ããããã¥ã¼ããªã¢ã«ã交ããªããç´¹ä»ããæ§æã«ãªã£ã¦ããã ãã Unit Testãç´¹ä»ããã ãã§ã¯ãªããUnit Testãã¼ã«ã§ããRspecã«ãBDDãã¼ã«ã§ããCucumberãçµã¿åããã¦ä½¿ããã¨ã§ãUnit Testã§ã«ãã¼ã§ããªãé¨åãCucumberã§è£ãéçºããããã¨ããã¨ããããã®æ¬ã®èã«ãªã£ã¦ããã ãã®æ¬ãèªã¿ãå®è·µãããã¨ã§ãUnit Test*ã ã*ãæ¸ãã¦ã·ã¹ãã ãä½ã£ã¦ããã¨ãã®ã¢ã¤ã¢ã¤æ
ä¼ãã§ãããã¡ã«ããã¶ãæéãçµã£ã¦ãã¾ãã¾ãããã10/31ã®OSCã«ã¦ãæéãããã ããRailsã®æ¨ä»ã®ãã¹ãäºæ ã«ã¤ãã¦ç´¹ä»ããã¦ããã ãã¾ãããæ®æ®µããç³ãã¦ããããã«Cucumberã¨RSpecãããã£ã¨æ¨ãã¦ãã¾ãã Rails testing environment, 2009 fallView more documents from Kyosuke MOROHASHI.ãã¨ã¯RSpecæ¹é¢ã§ãsubjectãitsã®ä½¿ãæ¹ã«ã¤ãã¦ã使ããªããèãã¦ãããããªãã¨ãæ¸ãã¦ãã¾ãã åã«ãªãã©ãæ¹é¢ã§CuctomMatcherã®è©±ãããã¨ãã«ãç°¡åãªCustomMatcherãéç£ããã®ã¯ã ããããããªã?ã¨ããæ¸å¿µããã£ããã§ããããã®ä¸ã¤ã®è§£ã¨ãã¦its()ã¯ããããªã¼ãã¨ã使ãåãã¯ãããªé¢¨ã«ãªãã¨æãã¾ãã CustomMatcherä½ã æ¤è¨¼å 容ãè¤éã«ãªãã¨ã ã¨
TDDã§éçºãã¦ãã人ã®ç®ä¸ã®æ©ã¿ã¯Slow teståé¡ãããªãã¡ãã¹ãã®å®è¡æéããããããã¦è¾ããã¨ããåé¡ã§ãã ãããµã¨æãã¨ããããã£ã¦ã次ã®ãããªã¿ã¹ã¯ãå®ç¾©ãã¦ãããããªãã¨ãããã¨ã§ããããåçã«æ©ããªã£ãã§ã¯ããã¾ãããã namespace :spec do spec_prereq = Array(File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop) desc "faster version of rake spec, but why?" task :faster => spec_prereq do %w[spec:models spec:controllers spec:views spec:helpers spec:lib].each do
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}