Skip to content

Instantly share code, notes, and snippets.

@itspriddle
Created March 27, 2012 20:34
Show Gist options
  • Save itspriddle/2220062 to your computer and use it in GitHub Desktop.
Save itspriddle/2220062 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