DEMO VIDEOS Get to know everything Vimeo can do for your business. Watch now
rspec-2.11 ããªãªã¼ã¹ããã¾ããããããã¤ãã®å¤æ´ç¹ã®ä¸ã«ãä»å¾ã¯ should ã§ã¯ãªã expect ãæ¨å¥¨ããããã©ã«ãã§ã¯ expect ã®ã¿ãæå¹åãããããã«ãªããã¨ãããã®ãããã¾ããã http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax å人çã«ãã®å¤æ´ã¯èª¬å¾åã«æ¬ ãããªã¼ã¨æã£ã¦ãã¦ã expect æ¨ãã«ããçç±ã should 㯠Kernel ã«ã¯ããã®ã§ Kernel ã include ããªã BasicObject ã®ã¤ã³ã¹ã¿ã³ã¹ã«å¯¾ã㦠should ãå¼ã¶ã¨ãããããªã æ¨æºã©ã¤ãã©ãª delegate 㯠Kernel ã®ã¡ã½ããã®ä¸é¨ã ãã include ããã®ã§ rspec 㨠delegate ã®ã©ã¡ããå ã«ãã¼ãããããã«ãã£ã¦ should ã®æå
ããã«ã¡ã¯ãã»ããã§ããAsset Pipeline ã«æéãåãã¦ããä»æ¥ãã®é ã§ãã ä»æ¥ã¯ç¤¾å 㧠RSpec ãããããåå¼·ããããã ãã©æ¤ç´¢ãã¦ãããããããªãï¼ã¨è³ªåãåããã®ã§ãèªãã¹ãã¨ã³ããªãã¾ã¨ãã¦ã¿ã¾ããã ï¼ ç¾ç¶ããã㨠RSpec.info ãã¾ãåºã¦ãããã©ããæ´æ°ããã¦ãªãã£ã½ãã®ã§åªãããªããã§ãããâ¦â¦ h2. ããã¯èªãã§ãããï¼ h3. ã¹ã¯ã¹ããã¯ã®ã¹ * âã¹ã¯ã¹ããã¯ã®ã¹ ã第 1 åã RSpec ã®æ¦è¦ã¨ãRSpec on Rails (ã¢ãã«ç·¨)â:http://jp.rubyist.net/magazine/?0021-Rspec * âã¹ã¯ã¹ããã¯ã®ã¹ ã第 2 åã RSpec on Rails (ã³ã³ããã¼ã©ã¨ãã¥ã¼ç·¨)â:http://jp.rubyist.net/magazine/?0023-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 ç´
ãã¯ãããããã¾ãã ãã¡ã ã§ãã ã¿ãªãããã¹ãã³ã¼ãæ¸ãã¦ã¾ããï¼ ç§ã¯ãã¹ãã¨è¨ãããã¨ãã©ããããæ°ããããã¾ããã ããã§BDDï¼ ä»åã¯BDDåå¿è ã®ç§ãããã£ã¦ã¿ãéç¨ã綴ãã¾ããããã³ã大æè¿ BDDã¨ã¯ï¼ Behavior Driven Development æ¯èé§åéçº ãã¹ãé§åéçºã§ã¯ãã¹ãã®ããã«ã³ã¼ããæ¸ã æ¯èé§åéçºã§ã¯æ¯èï¼ä»æ§ï¼ã®ããã«ã³ã¼ããæ¸ã çµæçã«ããäºã¯ã»ã¼ä¸ç· è¨ãæ¹ã§ã¢ããã¼ã·ã§ã³ãããªãå¤ãã ã¹ããã¯ï¼ã¹ããã¯ï¼ åè¨èªã®BDDãã¬ã¼ã ã¯ã¼ã¯ Ruby RSpec .NET NSpec Java JBehave PHP PHPSpec 10ã¹ãããã§ãã£ã¦ã¿ãBDD 1. ã¤ã³ã¹ãã¼ã« $ sudo gem install rspec 2. ã¹ããã¯ãæ¸ã # spec/hello_spec.rb require 'hell
æè¿sinatraã使ãå§ãã¾ããã rspecãsinatraã§ä½¿ãå§ããã¾ã§å³å¾å·¦å¾ããã®ã§ãã®æã®ã¡ã¢ cucumberã使ãããã¨æã£ããã©ãããã¯ã客ããã«è¦ããäºãã§ãããã¹ãä»æ§ã ããç¾å³ãããã§ãã£ã¦ãå人ã®è¶£å³ããã°ã©ãã³ã°ã§ããããsinatra使ã£ã¦ãµãã¯ãªã¨ãµã¤ãä½ãã«ã¯æ軽ããæãªãããæ°ãããã®ã§ã¨ããããä¿çã sinatraãã¤ã³ã¹ãã¼ã« $ sudo gem install sinatra $ sudo gem install rack appãä½æ $ mkdir myapp $ cd myapp $ touch app.rb /myapp/app.rb require "rubygems" require "sinatra" get '/' do "hello" end get '/hoge' do "get params #{params[:huga
åç° å人(@t_wada) ä½ãRSpec ã®å ¥éã¨ãã®ä¸æ©å ã¸ãã¯ã¯ãªã¨ã¤ãã£ãã»ã³ã¢ã³ãº 表示 - ç¶æ¿ 4.0 å½é ã©ã¤ã»ã³ã¹ã§æä¾ããã¦ãã¾ãã æ±äº¬ Ruby ä¼è° 03 ã® RSpec ã¯ã¼ã¯ã·ã§ããã®è³æã§ãããã®ã¯ã¼ã¯ã·ã§ããã§ã¯åå è ã®æ¹ã«ãåçµã(ã³ã¼ããæ¸ãåããã¨)ããã¦è²°ããTDD/BDD 㨠RSpec ãåæã«å¦ã¹ãããã«é½åº¦èª¬æãå ¥ããããã¡ã§è¡ãã¾ããã 第2ã¤ãã¬ã¼ã·ã§ã³ãæ¸ãã¾ãããç¶ãã«èå³ããæ¹ã¯ã覧ä¸ãã (æ´æ°) 第3ã¤ãã¬ã¼ã·ã§ã³ãæ¸ãã¾ãããç¶ãã«èå³ããæ¹ã¯ã覧ä¸ãã 1st iteration favotter ã® ã¿ãã㪠NG ã¯ã¼ãã®ãã£ã«ã¿ãªã³ã°æ©è½ã RSpec ã§ä½ãã¾ããããã¾ã㯠NG ã¯ã¼ãã®æ¤åºæ©è½ãä½æãã¾ãã ãã®ã¤ãã¬ã¼ã·ã§ã³ã§ã¯æåãã¿ãªå½¢ã®ãã¹ãã³ã¼ãã¨å®è£ ãæ¸ããã ãã ãã¨ãã®ã³ã¼ããæ´ç·´ããã¦ããã¾
RSpec on Railsã®ãããã ãã ããã°ããªããä»é ãBDD(Behaviour Driven Development)ãç¥ãã¾ããããã ããããã¯ãã¡ãã¨BDD or TDDã§éçºãé²ãã¾ãã BDDã¯ãã¹ãé§åéçºã¨è¨èã®è¨ãåãã大ããç°ãªã£ã¦ããã ãããã¤ãã¢ãæ¸ãã¦ä»æ§ãè¨è¨ããããããã大ããªããªã·ã¼ã BDDã§ã¯å¿ ãä»æ§ã³ã¼ã(spec)ãæ¸ãã¦ããå®éã®ã³ã¼ãã£ã³ã°ãè¡ãã Rubyã«ã¯ãRSpecã¨ãããã¼ã«ããããããå©ç¨ããã gemããã±ã¼ã¸ãç¨æããã¦ããã®ã§ç°¡åã $ gem install rspec 次ã«RSpec on Railsãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ã REL_X_Y_Zã®é¨åãrspecã®ãã¼ã¸ã§ã³ã¨ããããå¿ è¦ãããã $ cd RAILS_ROOT $ ruby script/plugin install svn://rubyfor
ååtoytterã«rails2.0ãªãã§ã¯ã®æ©è½ãå ¥ãã¦è¡ãã¨è¨ãã¾ããããæ¡å¼µãã¦ããããªããã¹ãã¯ç¡è¦ã§ããªãããã¨ããããªãã®å¯ãéã§ãã railsã«ã¯æåãããã¹ããããããã®æ çµã¿ãç¨æããã¦ãã¦ãããªããã¹ãã¸ã®æ·å± ã¯ä½ããªã£ã¦ãããã§ãããããã¨ã¯å¥ã«RSpec on Railsã¨ãããã®ã使ããã¨ãã§ãã¾ãã ãã®RSpecããã£ã¦ããããã¨ã¯Test::Unitã¨åãããã¹ãããªãã§ãããé常ã«æ°æã¡ãããã¹ããæ¸ããã¨ãã§ãã¾ããç¹ã«TDD(ãã¹ãé§åéçº)ããã£ã¦ãããããããã£ã¦äººã«ã¯ãå§ãã§ã ãã¡ãã®ãã¼ã¸ã§ã¨ã¦ããããããã解説ãã¦ããã¦ãã¾ãã ã¹ã¯ã¹ããã¯ã®ã¹ã第ï¼åã ã§ã¯æ©éãtoytterã§ãrspecã使ããããã«ãã¾ãã ã¤ã³ã¹ãã¼ã«æ¹æ³ã¯ $ gem install rspec $ ./script/plugin install http:
ããã³ã¾ãã¯ã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 ç´
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}