Sha256: 5198980d0571e933941ae211e5f6fef7ffb590ab06dd13e84922ad2a1350295c
Contents?: true
Size: 701 Bytes
Versions: 7
Compression:
Stored size: 701 Bytes
Contents
dir = File.dirname(__FILE__) require "#{dir}/../../example_helper" describe RR, "#mock" do before do @subject = Object.new end it "creates a mock Double Scenario" do mock(@subject).foobar(1, 2) {:baz} @subject.foobar(1, 2).should == :baz end end describe RR, "#stub" do before do @subject = Object.new end it "creates a stub Double Scenario" do stub(@subject).foobar {:baz} @subject.foobar("any", "thing").should == :baz end end describe RR, "#probe" do before do @subject = Object.new def @subject.foobar :baz end end it "creates a probe Double Scenario" do probe(@subject).foobar @subject.foobar.should == :baz end end
Version data entries
7 entries across 7 versions & 1 rubygems