RSpecはじめました

kkabetani
October 19, 2013

 RSpecはじめました

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

kkabetani

October 19, 2013

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

39 slides
  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

More Decks by kkabetani

Other Decks in Programming