Cucumber ã使ãè¾¼ãã°ããµããã£ã¬ã¯ããªã使ã£ã¦ feature ãã¡ã¤ã«ãåé¡ããããªãã¾ããã ãã¹ãå ¨ä½ãä¸æ°ã«å®è¡ããæã¯ããã®ã§ããã cucumber features/admin/login.feature ã®ããã«å®è¡ããã¨ãfeatures/step_definitions ãã£ã¬ã¯ããªã®ã¹ãããå®ç¾©ãèªã¿è¾¼ã¾ããªããã¨ããåé¡ãããã¾ãã ããã解決ããã«ã¯ cucumber --require features features/admin/login.feature ã®ããã«å®è¡ãã¾ãã config/cucumber.yml ã® std_opts = '...' ãä¿®æ£ããã°ããã¡ãã¡ãªãã·ã§ã³ãä»ããå¿ è¦ããªããªãã¾ãã std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --stri
ä»æµè¡ãã¤ã¤ãã話é¡ã®Cucumberã¨WebratãRailsã§ä½¿ã£ã¦ã¿ã¾ããã Cucumberã¨Webratãªãããã¨ãã人ã¯id:moroããã®ã Cucumberãã¢ããããåèã«ãªãã¾ãã ä»åãã£ãã㨠Railsã«Cucumberãå ¥ãã¦ã¿ã Featureã®äºç´èªãæ¥æ¬èªã«ãã¦åããã¦ã¿ã Cucumberãautotestã§ãåãããã«ãã¦ã¿ã autotestã®çµæãGrowlã«éç¥ããããã«ãã¦ã¿ã åèãµã¤ã ä¸è¨ã®Cucumberãã¢ãã Cucumberã®github å¿ è¦ãªããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã« 以ä¸ã®gemãå¿ è¦ã¿ãããªã®ã§ãã¾ã ã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ã¤ã³ã¹ãã¼ã«ãã¾ãã rspec rspec-rails cucumber webrat term-ansicolor treetop diff-lcs nokogiri ZenTest(autote
åãã㦠spork ã使ã£ã¦ããã®ã§ãSpork.each_run ã®ä¸ã«æ¸ãã åºæ¬çã«ã¯ cucumber/rails/world ã®å¾ã« rr ã require ãã Cucumber::Rails::World ã« RR::Adapters::RRMethods ã include ããã å¾ã¯ Before 㧠RR.reset ãå¼ãã§ã·ããªãªéã®å½±é¿ãæãã å¿ è¦ã§ããã° After 㧠RR.verify ãå¼ãã§ã¨ã¯ã¹ãã¯ãã¼ã·ã§ã³ã®æ¤è¨¼ããã SEE ALSO: http://blog.timurv.ru/2009/4/29/cucumber-with-rr-double-ruby gist:160099 · GitHub
â [cucumber][capybara][ruby] cucumber 㨠capybara ä»ã®ããã¸ã§ã¯ãã§ã¯ cucumber ã使ã£ãããã¦ããã®ã§ãcucumber-rails ã«ã¤ãã¦ã ãã¶ä¸çæ¸å½èª¿ã¹ã¦ã¿ãããã¡ãã webrat ã§ã¯ãªã capybara ã使ãåæã @javascript ã«ã¤ã㦠cucumber 㧠@javascript ã¿ã°ãä»ãã㨠Capybara.javascript_driver ã«è¨å®ããå¤ããã®ã·ããªãªã«éã£ã¦ Capybara.current_driver ã¨è¨å®ããã¦åããã¤ã¼ããCapybara.javascript_driver ã¯ãã㨠capybara/rspec ã® :js => true ã§ããæå³ãç¡ããã®ã ã£ãããªããªãã ã£ã¦ã¼ã Capybara.javascript_driver ã¯ç¹ã«å¤æ´ããªãéã :
ã¡ãã£ã¨å æ¥äººåã§è©±ãæ©ä¼ãããã調ã¹ã¦ããã®ã§ãã æ¥æ¬èªã§ããããæ å ±ããªã æ¥æ¬èªã§ã®featureã®æ¸ãæ¹ãæ¬å®¶ã«mergeããã ã¿ãããªã®ã§ãããã©ãã«ãæ å ±ããªãã£ãã®ã§ã¾ã¨ãã¦ããã¾ãã Railsç¨ã®ã»ããã¢ãã Rails3.0以éããgemãã¡ã¤ã«ã®ã»ããã¢ããã¯RAILS_ROOT/Gemfileã«å¿ è¦ã¨ããgemãè¨è¿°ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ããç¹ã«æ¬çªç°å¢ãè¤æ°ç¨æããæã«ãgemã®ã¤ã³ã¹ãã¼ã«ãã¹ãé²ãã¨ããæå³åããããã¨ã®ãã¨ã§ããrails-cucumberã®READMEã ãã§ã¯å®è¡æã«ã¨ã©ã¼ãã§ãã®ã§ãramazeã¨webratãå¢ããã¦ããã¾ãã*1 :RAILS_ROOT/Gemfile group :cucumber do gem 'rspec-rails', '>= 2.0.0.beta.10' gem 'capybara' gem 'databa
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}