summaryrefslogtreecommitdiff
path: root/spec/config
diff options
context:
space:
mode:
authorr-obert <robert@jazzonmymind.xyz>2017-06-23 17:42:04 +0100
committerr-obert <robert@jazzonmymind.xyz>2017-06-23 17:42:04 +0100
commit72a17c5b246a1e2ac1871ded978979c370c4fa55 (patch)
treefd11480db1ba0ad883b6add8fab13907de453427 /spec/config
parentba49f4caa6998b427e246d105e5b91d8bc01ac03 (diff)
downloadpry-72a17c5b246a1e2ac1871ded978979c370c4fa55.tar.gz
last_default might not be a Pry::Config::Memoized
Diffstat (limited to 'spec/config')
-rw-r--r--spec/config/behavior_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/config/behavior_spec.rb b/spec/config/behavior_spec.rb
index 5f62991f..a6d46c8e 100644
--- a/spec/config/behavior_spec.rb
+++ b/spec/config/behavior_spec.rb
@@ -5,12 +5,18 @@ RSpec.describe Pry::Config::Behavior do
include Pry::Config::Behavior
end
end
-
+
describe "#last_default" do
- it "returns the last default in a list of defaults" do
+ it "returns the last default" do
last = behavior.from_hash({}, nil)
middle = behavior.from_hash({}, last)
expect(behavior.from_hash({}, middle).last_default).to be(last)
end
end
+
+ describe "#eager_load!" do
+ it "returns nil when the default is nil" do
+ expect(behavior.from_hash({}, nil).eager_load!).to be(nil)
+ end
+ end
end