Skip to content

Instantly share code, notes, and snippets.

@jeremywrowe
Created August 20, 2013 23:56
Show Gist options
  • Save jeremywrowe/6288851 to your computer and use it in GitHub Desktop.
Save jeremywrowe/6288851 to your computer and use it in GitHub Desktop.
require "spec_helper"
describe FuManchu do
let(:something_expensive) { Record.new.tap(&:save) }
let(:something_inexpensive) { OpenStruct.new(cheap: true) }
context "a stash" do
it "uses the something expensive" do
expect(something_expensive).to take_a_long_time
end
it "does not use the something expensive" do
expect(something_inexpensive).to be_fast
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment