Skip to content

Instantly share code, notes, and snippets.

@cheald
Created November 23, 2012 08:48
Show Gist options
  • Select an option

  • Save cheald/4134606 to your computer and use it in GitHub Desktop.

Select an option

Save cheald/4134606 to your computer and use it in GitHub Desktop.
describe "let behavior" do
foo = "original recipe"
let(:foo) { "extra crispy" }
specify { foo.should == "extra crispy" }
end
% rspec let.rb
F
Failures:
1) let behavior
Failure/Error: specify { foo.should == "extra crispy" }
expected: "extra crispy"
got: "original recipe" (using ==)
# ./let.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00035 seconds
1 example, 1 failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment