Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- class Foo
- def bar; :foo_bar; end
- end
- describe Foo do
- subject { Foo.new }
- it do
- Foo.any_instance.stub(:bar).and_return("no, im the bar")
- p subject.bar
- p subject.dup.bar
- end
- end
Add Comment
Please, Sign In to add comment