Skip to content

Commit

Permalink
add lazy_spec.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
strcmp committed Dec 31, 2015
1 parent 983daf6 commit 398a62b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/config/lazy_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 398a62b

Please sign in to comment.