Am I correct in understanding that the point of using let is that it can
minimize database calls due to memoization?
describe "#something" do
let(:something) = Something.groovy_scope
it "does x" do
something.first.x.should have_coolness
end
it "does y" do
something.first.y.should_not have_coolness
end
end
vs.
describe "#something" do
before :each do
@something = Something.groovy_scope
end
it "does x" do
@something.first.x.should_not have_coolness
end
it "does y" do
@something.first.y.should_not have_coolness
end
end
...
Is that the proper usage?
Patrick J. Collins
http://collinatorstudios.com
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users