Sha256: e95caa2a6b325289b4fe96d9afca52debb83105abd0f992cec7abfcf692b60f8
Contents?: true
Size: 668 Bytes
Versions: 14
Compression:
Stored size: 668 Bytes
Contents
require "examples/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
14 entries across 14 versions & 1 rubygems