module RSpec::Core::Let::ExampleGroupMethods

def let(name, &block)

end
end
thing.should be_something
# second invocation, returns the memoized value

thing.do_something
# first invocation, executes block, memoizes and returns result
it "does something" do

let(:thing) { Thing.new }
describe Thing do

@example

after the first call.
Generates a method whose return value is memoized
def let(name, &block)
  define_method(name) do
    __memoized.fetch(name) {|k| __memoized[k] = instance_eval(&block) }
  end
end