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:
parent
983daf6fd5
commit
398a62bf79
1 changed files with 13 additions and 0 deletions
13
spec/config/lazy_spec.rb
Normal file
13
spec/config/lazy_spec.rb
Normal 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
|
Loading…
Reference in a new issue