Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RSpecはじめました

kkabetani
October 19, 2013

 RSpecはじめました

kanazawa.rb meetup #14 で行われたミニコーナー「Test ! Test !! Test !!!」で発表したスライド

kkabetani

October 19, 2013
Tweet

More Decks by kkabetani

Other Decks in Programming

Transcript

  1. ࠷ॳʹॻ͍ͨ34QFD require 'spec_helper' describe "Static pages" do describe "Home page"

    do it "should have the content 'Sample App'" do visit '/static_pages/home' page.should have_content('Sample App') end end end
  2. ࠷ॳʹॻ͍ͨ34QFD require 'spec_helper' describe "Static pages" do describe "Home page"

    do it "should have the content 'Sample App'" do visit '/static_pages/home' page.should have_content('Sample App') end end end
  3. ࠷ॳʹॻ͍ͨ34QFD require 'spec_helper' describe "Static pages" do describe "Home page"

    do it "should have the content 'Sample App'" do visit '/static_pages/home' page.should have_content('Sample App') end end end
  4. ෼͔͖ͬͯͨ describe Bowling, "#score" do it "returns 0 for all

    gutter game" do bowling = Bowling.new 20.times { bowling.hit(0)} bowling.score.should eq(0) end end
  5. ෼͔͖ͬͯͨ describe Bowling, "#score" do it "returns 0 for all

    gutter game" do bowling = Bowling.new 20.times { bowling.hit(0)} bowling.score.should eq(0) end end
  6. ෼͔͖ͬͯͨ describe Bowling, "#score" do it "returns 0 for all

    gutter game" do bowling = Bowling.new 20.times { bowling.hit(0)} bowling.score.should eq(0) end end