1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

add lazy_spec.rb

This commit is contained in:
strcmp 2015-12-31 03:59:53 +00:00
parent 983daf6fd5
commit 398a62bf79

13
spec/config/lazy_spec.rb Normal file
View file

@ -0,0 +1,13 @@
require 'helper'
RSpec.describe Pry::Config::Lazy do
let(:lazyobject) do
Class.new do
include Pry::Config::Lazy
lazy_implement({foo: proc {"bar"}})
end.new
end
it 'memorizes value after first call' do
expect(lazyobject.foo).to equal(lazyobject.foo)
end
end