Sha256: 962eac51db111c7ba2d031da26347fe251a7064c084d6259334f706a223f873d
Contents?: true
Size: 1.65 KB
Versions: 5
Compression:
Stored size: 1.65 KB
Contents
require "spec/spec_helper" module RR module Adapters describe Rspec do describe "#setup_mocks_for_rspec" do before do @fixture = Object.new @fixture.extend Rspec @subject = Object.new @method_name = :foobar end it "resets the double_injections" do RR::Space.double_injection(@subject, @method_name) RR::Space.double_injections.should_not be_empty @fixture.setup_mocks_for_rspec RR::Space.double_injections.should be_empty end end describe "#verify_mocks_for_rspec" do before do @fixture = Object.new @fixture.extend Rspec @subject = Object.new @method_name = :foobar end it "verifies the double_injections" do double_injection = RR::Space.double_injection(@subject, @method_name) double = RR::Space.double(double_injection) double.once proc do @fixture.verify_mocks_for_rspec end.should raise_error(::RR::Errors::TimesCalledError) RR::Space.double_injections.should be_empty end end describe "#teardown_mocks_for_rspec" do before do @fixture = Object.new @fixture.extend Rspec @subject = Object.new @method_name = :foobar end it "resets the double_injections" do RR::Space.double_injection(@subject, @method_name) RR::Space.double_injections.should_not be_empty @fixture.teardown_mocks_for_rspec RR::Space.double_injections.should be_empty end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems