Skip to content

Instantly share code, notes, and snippets.

Created December 5, 2013 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/7812699 to your computer and use it in GitHub Desktop.
Save anonymous/7812699 to your computer and use it in GitHub Desktop.
How many of these tests pass?
describe "rspec" do
context "using .each" do
[1,2].each do |x|
let(:y) { x }
specify "#{x} == #{x}" do
y.should == x
end
end
end
a = 1
let(:b) { a }
specify "#{a} == #{a}" do
b.should == a
end
a = 2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment