Guest User

Untitled

a guest
Sep 20th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. class Foo
  4. def bar; :foo_bar; end
  5. end
  6.  
  7. describe Foo do
  8. subject { Foo.new }
  9.  
  10. it do
  11. Foo.any_instance.stub(:bar).and_return("no, im the bar")
  12.  
  13. p subject.bar
  14. p subject.dup.bar
  15. end
  16. end
Add Comment
Please, Sign In to add comment