æ¬æ¥å¤§æ±æ¸*1ã§è¡ããã大æ±æ¸Rubyä¼è°01ã§ãé«éãªãã¹ããµã¤ã¯ã«ãåãã«ã¯ã¨ããå 容ã§çºè¡¨ãã¦ãã¾ããã 大æ±æ¸Rubyä¼è°01 é«éãªãã¹ããµã¤ã¯ã«ãåãã«ã¯ View more presentations from hotchpotch ãã¹ããéãããã«ã¯äºãã¿ã¼ã³ãããä¸ã¤ã¯åä½å®è¡æã®é度ã»ãã£ã¼ãããã¯ã®é«éåãããä¸ã¤ã¯ãã¹ã¦ã®ãã¹ãå®è¡æã®é«éåãããã¨æã£ã¦ãã¦ããããã«ã¤ãã¦ã®è©±ã§ãããã ã£ã¨ã¾ã¨ããã¨ãååã®åä½å®è¡æã®é度ã»ãã£ã¼ãããã¯é«éåã«ã¯ spork / prefetch-rspec / autotest / watchr ã使ããã¨ãã話ã¨ãå¾å㯠REE / parallel_tests ã«ããé«éåã»ä¸¦åå®è¡ãremote spec ã«ãããªã¢ã¼ããã·ã³ã§ã®åæ£ãã¹ãã«ã¤ãã¦ã®è©±ã§ãã ç¹ã«ãªã¬ãªã¬ããã¸ã§ã¯ãã® prefetch-rspec
ããã³ã¾ãã¯ãRuby ã«é¢ããæè¡è¨äºã¯ãã¡ããã®ãã¨ãRubyist ã¸ã®ã¤ã³ã¿ãã¥ã¼ãã¨ãã»ã¤ããã®ä»ããå±ãããã¦ã§ãéèªã§ãã Rubyist Magazine ã«ã¤ã㦠ãRubyist Magazineããç¥ãã¦ããã³ã¾ãã¯ãæ¥æ¬ Ruby ã®ä¼ã®æå¿ã«ãã Rubyist ã® Rubyist ã«ãããRubyist ã¨ããã§ãªã人ã®ããã®ã¦ã§ãéèªã§ãã ææ°å· Rubyist Magazine 0058 å· ããã¯ãã³ãã¼ Rubyist Magazine 0058 å· RubyKaigi 2018 ç´åç¹éå· Rubyist Magazine 0057 å· RubyKaigi 2017 ç´åç¹éå· Rubyist Magazine 0056 å· Rubyist Magazine 0055 å· Rubyist Magazine 0054 å· æ±äº¬ Ruby ä¼è° 11 ç´
RSpecã§æ¸ãã¦ããã¹ããã¯ï¼ãã¹ãï¼ãã©ããåé·ã«ãªã£ã¦ããæ°ããã¦ããããã¹ãã®ãªãã¡ã¯ã¿ãªã³ã°æéã¯ãªãããªã¨æ¢ãã¦ã¿ãã¨ãããRSpecã®ãã¹ããã©ã¯ãã£ã¹ãã¾ã¨ãã¦ãããã¼ã¸ã2ã¤ã»ã©è¦ã¤ããã®ã§ã¾ã¨ãã¦ããã (My) RSpec best practices and tips | EggsOnBread specify {}ãit {}ãsubject {}ã¨ãã£ãã·ã§ã¼ãã«ããè¨æ³ã使ã contextã'when'ã'with'ã§å§ãã¦ãã¡ã½ããã®èª¬æã«ã¯'#'ã使ã ã¨ã©ã¼ã¡ãã»ã¼ã¸ããããããããªã ã¡ãã»ã¼ã¸ããããããããã®ã«ããããã«RSpecãããã£ã¼ã使ã 1ã¤ã®itãããã¯ã«ã¯1ã¤ã®Expectationã ããè¨è¿°ãã describeã¨contextããµãã ãã«ä½¿ã 妥å½ãªå¤ãå¢çå¤ãä¸æ£ãªå¤ããã¹ããã My top 7 RSpec best pra
Kerry Buckleyãã?ã®RSpecã®ã¹ã©ã¤ããåãããã§ãã RSpec 3åã®1ãããç¥ããªãå 容ãè¼ã£ã¦ããæãã§ãã èªã¿ãããã¨ã¦ãè¯ãçºã¾ã£ã¦ãã®ã§ ã¾ãä½åº¦ãèªã¿è¿ãã¨æãã¾ãã æ°ã«ãªã£ãã¨ã .rspec spec.opts ã£ã¦deprecateãªãã§ããã .rspecãã¡ã¤ã«ãããã§ãã fuubar ãã¹ãã®é²è¡å ·åãããã°ã¬ã¹ãã¼è¡¨ç¤ºãã¦ããã ãããããã¼ã«ã§ããæ©éinstallãã¦ã¿ã¾ãã $ gem install fuubar Fetching: rspec-instafail-0.1.5.gem (100%) Fetching: fuubar-0.0.3.gem (100%) Fetching: rspec-core-2.4.0.gem (100%) **********************************************
èªå㯠Ruby ã³ã¼ãã®åä½ãã¹ãã« RSpec ã使ã£ã¦ããã§ãããããã°ã©ã ã³ã¼ãããã¹ãã³ã¼ããæ´æ°ãã度ã«ãã¡ãã¡æåã§ãã¹ããå®è¡ãã¦ãã¾ããã autotest ã¨ããã®ã使ãã°èªåã§ãã¹ããå®è¡ãããã¨ãã話ã¯èãã¦ããã®ã§ãã¡ãã£ã¨èª¿ã¹ã¦ã¿ã¾ããã 使ç¨ãã¦ãããã¼ã¸ã§ã³ã¯ RSpec 2.3.0, ZenTest 4.4.2 ã§ãã ã¤ã³ã¹ãã¼ã« autotest 㯠ZenTest ã¨ãã gem ã«å ¥ã£ã¦ããã®ã§ãããã¤ã³ã¹ãã¼ã«ãã¾ãã # gem install ZenTest å®è¡ ããã¸ã§ã¯ãã®ããããã£ã¬ã¯ããªããã®ããªã¼ã次ã®ããã«ãªã£ã¦ããå ´åã ./lib/hoge.rb ./lib/fuga.rb ./spec/hoge_spec.rb ./spec/fuga_spec.rb次ã®ããã«å®è¡ãã¾ãã % autotest --style rspec2
2010å¹´11æ3æ¥æ°´ææ¥ ãã¹ãé§åéçºã®ç°å¢ãæ´ãã(rspec + autotest + growl) (2010/11/07ã«å¤§å¹ ä¿®æ£ããï¼ rspecã®ãã¼ã¸ã§ã³ãä¸ãã£ã¦ãautospecããµãã¼ããããªããªã£ãã代ããã«autotestã使ããæè¿ã®ãã¼ã¸ã§ã³ã«å¯¾å¿ããæ å ±ãç¡ãã£ãã®ã§ãè¨äºã«ããã ä¸çªä¿¡é ¼ã§ããè¨äºã¯rspec@github.comã®Wikiã«ãã"autotest"ãååãªãµã¼ãããæã¯rspecã®rdocã«autotestã®é ç®ããªãã®ã確èªããã ãã§ããã¡ãã®Wikiã¯ãã¼ãã¼ã¯ã ã£ããçµè«ã¨ãã¦ã¯ããã®Wikiãè¦ãã ãã§å®ç§ã«ã»ããã¢ããã§ããã 以åæ¸ããè¨äºãä¸è¨ã®Wikiããã¼ã¹ã«æ¸ãç´ããã(2010/11/07) å½æ¹ã®ç°å¢ã¯ Max OS X 10.6.4 + ruby 1.9.2 Windows XP SP3  + ru
åç° å人(@t_wada) ä½ãRSpec ã®å ¥éã¨ãã®ä¸æ©å ã¸ã第3ã¤ãã¬ã¼ã·ã§ã³ãã¯ã¯ãªã¨ã¤ãã£ãã»ã³ã¢ã³ãº 表示 - ç¶æ¿ 4.0 å½é ã©ã¤ã»ã³ã¹ã§æä¾ããã¦ãã¾ãã 大ããæéãéãã¦ãã¾ãã¾ãã(ãã¿ã¾ããâ¦)ãRSpec å ¥éã®ç¬¬ä¸ã¤ãã¬ã¼ã·ã§ã³ã§ãã (第3å coffee.rb ã®éå¬ã«åãããã©ã¤ãæ´æ°ã§æ¸ããã¾ããã®ã§ãã¾ã 詳細ã®èª¬æã¯éä¸ã®ã¨ãããããã¾ãã) 第1ã¤ãã¬ã¼ã·ã§ã³ 第2ã¤ãã¬ã¼ã·ã§ã³ ååçµäºæç¹ã®ã³ã¼ãã¨å®è¡çµæ ãã®ãRSpec å ¥éã¨ãã®ä¸æ©å ã¸ãã·ãªã¼ãºã§ã¯ãã¡ãã»ã¼ã¸ãã£ã«ã¿ã RSpec ã使ã£ã¦éçºãããã¨ã§ã RSpec ã®æ©è½ã¨ TDD ãåæã«å¦ã¶ãã¨ãçãã¨ãã¦ãã¾ãã ååçµäºæç¹ã®ã³ã¼ãã¨å®è¡çµæãã¾ãè¨ãã¾ãã message_filter.rb class MessageFilter def initialize(*w
Rspecãã¡ã½ããä¸è¦§ Rspecã®ã¡ã½ããã§å©ç¨é »åº¦ã®é«ãã¡ã½ãããç´¹ä»ãã¾ãã HTTPã¬ã¹ãã³ã¹ã³ã¼ãã200ã§ãããç¢ºèª response.should be_success HTTPã¬ã¹ãã³ã¹ã³ã¼ãã300-399ã§ãããç¢ºèª response.should be_redirect æå®ããtempleteãå¼ã³ã ãã¦ãããç¢ºèª get 'some_action' response.should render_template("path/to/template/for/action") ã¬ã¹ãã³ã¹ã®bodyé¨åã®ç¢ºèª(render :text => "expected text"ã®ç¢ºèª) get 'some_action' response.should have_text("expected text") ã¬ã¹ãã³ã¹å ã®ã¢ã¯ã·ã§ã³ã®ç¢ºèª(redirectto
Ruby on Railsã§RSpecãPluginã¨ãã¦ã¤ã³ã¹ãã¼ã«ããæ¹æ³ã Rails 2.3.5ã§ç¢ºèª 2010/4/9ç¾å¨ã®ææ°ãã¼ã¸ã§ã³ã¯ rspec:1.3.0 rspec-rails:1.3.2 以ä¸Rails_Root㧠rspecã®ã¤ã³ã¹ãã¼ã« $ ruby script/plugin install git://github.com/dchelimsky/rspec.git -r 'refs/tags/1.3.0' rspec-railsã®ã¤ã³ã¹ãã¼ã« $ ruby script/plugin install git://github.com/dchelimsky/rspec-rails.git -r 'refs/tags/1.3.2' generateã§script/spec ãspecãã£ã¬ã¯ããªãä½æãããã $ ./script/generate rspec
ååï¼ç¬¬35åï¼ã¯wwã使ã£ã¦Webã®ããã«ã¨ãªããµã¼ããä½ããã¹ãã¤æ©è½ã使ã£ã¦ã¯ã©ã¤ã¢ã³ãããã®ãªã¯ã¨ã¹ãã®ç¶æ³ãç®è¦ç¢ºèªããæ¹æ³ã説æãã¾ããã ä»åã¯ãããããã°ã¸ã®ã¡ãã»ã¼ã¸æ稿ãéãã¦ãwwãèªååãã¹ãã«çµã¿è¾¼ãæ¹æ³ã説æãã¾ãã RSpecã®èªåãã¹ãã®ä¸ãããµã¼ããèµ·ååæ¢ãã wwã¯ãåä¸ã®ãµã¼ãããã»ã¹ã¨ãã¦èµ·åãããã»ãã«ãèªååãã¹ãã®ä¸ã§å®ç¾©ã»èµ·åã»åæ¢ããããã®APIãåãã¦ãã¾ããååä½ã£ãããã«ãµã¼ãããRSpecããèµ·åã»åæ¢ãããã¹ãã³ã¼ãã¯æ¬¡ã®ããã«ãªãã¾ãã # spec/miniblog_client_spec.rb $:.unshift File.expand_path("../lib", File.dirname(__FILE__)) require 'miniblog_client' require 'ww' describe Minibl
追è¨2ï¼2015/09/08ï¼ããããããã¨ã«ãæªã ã«ãã®è¨äºãããã¯ãã¼ã¯ãã¦ãã ããæ¹ãããã£ãããã¾ããã2008å¹´ã«æ¸ããè¨äºãªã®ã§ã注æä¸ãããå 容ã¯ã¢ãããã¼ããã¦ãã¾ãããç§èªèº«ã¯ãã§ã«Rubyã使ã£ã¦ãã¾ããã 追è¨ï¼å¤ãæ å ±ã§ãã®ã§ãè¨äºã®æ¥ä»ã¨ã使ãã®RSpecã®ãã¼ã¸ã§ã³ãè¦æ¯ã¹ã¦ãåèç¨åº¦ã«ã覧ãã ããã大é¨åã¯éç¨ããã¯ãã§ããã Matcherããã¡ãã¡èª¿ã¹ãã®ãé¢åã«ãªã£ã¦ãå ¬å¼ã®ãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ã¯ä¸è¦§æ§ãä½ããããèªåã§ä¸è¦§è¡¨ãä½ã£ãã RSpecãã®ãã®ã«ã¤ãã¦ã¯ãã¹ã¯ã¹ããã¯ã®ã¹ ã第 1 åã RSpec ã®æ¦è¦ã¨ãRSpec on Rails (ã¢ãã«ç·¨)ãªã©ãã©ããããã®ãã¡RSpec on Railsçãä½ãäºå®ã åå not((should_notã§ä½¿ãããã©ããã¨ããæå³ã)) æå³ã»æ©è½ == â ==æ¼ç®åãå©ç¨ãã¦æ¯è¼ãããex
â 1 ãã¹ã¯ã¹ããã¯ã®ã¹ãRSpecã«ãããã¹ãé§åéçºã®å®æ¼ãã | View | Upload your own (ä¼å ´ããsshã使ããªãã®ã§ãPDFã¯ããããã£ã¦ã¯slideshare.netã®ãã¦ã³ãã¼ãããå©ç¨ãã ãã) ãªãã¨ãç¡äºã«çµããã¾ããããã®æ¥è¨ã§äºåã«åç¥ã§ããããããustream.tvã§ã®ä¸ç¶ãéãã¦æå¹ä»¥å¤ã®çããã«ãã©ã¤ãã§è¦ã¦ããããã¿ãããã¤ã³ã¿ã¼ããããããã ã¡ãªã¿ã«ãä»åã®çºè¡¨ã¯ããããµãã§ã®id:t-wadaã®ã»ãã·ã§ã³ã¨ãã¼ãã¯ã¾ã£ããåããªã®ã§ããããµãã®ã»ãã·ã§ã³ãåµå¯ãã¦ããããFizzBuzzã§ã60åã§ã¯ããããã¦ããªãã£ãã ã ããä»åã®ãBowling Game Kataã¯çµ¶å¯¾ããã¶ã¯ç¡çã ãããªããã¨æã£ã¦ããã30åæéã延é·ãã¦ãããã¾ãããææ¿ãæå¹ is nice. çºè¡¨ã§ã¯è³ªçå¿çãã§ãã¦ããã¦ãªã³ã°ã²ã¼ã ãå®æãã
åç° å人(@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
åç° å人(@t_wada) ä½ãRSpec ã®å ¥éã¨ãã®ä¸æ©å ã¸ãã¯ã¯ãªã¨ã¤ãã£ãã»ã³ã¢ã³ãº 表示 - ç¶æ¿ 4.0 å½é ã©ã¤ã»ã³ã¹ã§æä¾ããã¦ãã¾ãã æ±äº¬ Ruby ä¼è° 03 ã® RSpec ã¯ã¼ã¯ã·ã§ããã®è³æã§ãããã®ã¯ã¼ã¯ã·ã§ããã§ã¯åå è ã®æ¹ã«ãåçµã(ã³ã¼ããæ¸ãåããã¨)ããã¦è²°ããTDD/BDD 㨠RSpec ãåæã«å¦ã¹ãããã«é½åº¦èª¬æãå ¥ããããã¡ã§è¡ãã¾ããã 第2ã¤ãã¬ã¼ã·ã§ã³ãæ¸ãã¾ãããç¶ãã«èå³ããæ¹ã¯ã覧ä¸ãã (æ´æ°) 第3ã¤ãã¬ã¼ã·ã§ã³ãæ¸ãã¾ãããç¶ãã«èå³ããæ¹ã¯ã覧ä¸ãã 1st iteration favotter ã® ã¿ãã㪠NG ã¯ã¼ãã®ãã£ã«ã¿ãªã³ã°æ©è½ã RSpec ã§ä½ãã¾ããããã¾ã㯠NG ã¯ã¼ãã®æ¤åºæ©è½ãä½æãã¾ãã ãã®ã¤ãã¬ã¼ã·ã§ã³ã§ã¯æåãã¿ãªå½¢ã®ãã¹ãã³ã¼ãã¨å®è£ ãæ¸ããã ãã ãã¨ãã®ã³ã¼ããæ´ç·´ããã¦ããã¾
æ¬ã®ç´¹ä»ç¬¬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*ã ã*ãæ¸ãã¦ã·ã¹ãã ãä½ã£ã¦ããã¨ãã®ã¢ã¤ã¢ã¤æ
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}