Skip to content

Instantly share code, notes, and snippets.

@jjb
Created March 7, 2013 19:42
Show Gist options
  • Save jjb/5111128 to your computer and use it in GitHub Desktop.
Save jjb/5111128 to your computer and use it in GitHub Desktop.
describe "#bar" do
let(:foo){FactoryGirl.build_stubbed(:foo)}
let(:bar_id){double("bar_id")}
let(:bar){double("bar")}
subject{foo.bar}
before do
foo.stub(:bar_id){bar_id}
Foo.stub(:find).with(bar_id){bar}
end
it{should eq bar}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment