spec/rr/double_spec.rb in rr-0.10.4 vs spec/rr/double_spec.rb in rr-0.10.5

- old
+ new

@@ -158,11 +158,14 @@ end end describe "when implemented by a method" do it "sends block to the method" do - def subject.foobar(a, b) - yield(a, b) + class << subject + remove_method :foobar + def foobar(a, b) + yield(a, b) + end end double.definition.with(1, 2).implemented_by(subject.method(:foobar)) subject.foobar(1, 2) {|a, b| [b, a]}.should == [2, 1] \ No newline at end of file