Skip to content

Instantly share code, notes, and snippets.

@jmazzi
Forked from itspriddle/broke.rb
Created March 27, 2012 20:42
Show Gist options
  • Save jmazzi/2220103 to your computer and use it in GitHub Desktop.
Save jmazzi/2220103 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment