diff options
author | r-obert <r-obert@users.noreply.github.com> | 2018-12-01 08:51:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-01 08:51:52 +0100 |
commit | b5538b850118c427e3b99ed351d60518d6cf8fe4 (patch) | |
tree | ef4e5bad4f66337632f062f97b2a69cf30837926 /spec/config | |
parent | 642588dfe9bf7fa5c431451857a9ab0ed6fd33b6 (diff) | |
download | pry-b5538b850118c427e3b99ed351d60518d6cf8fe4.tar.gz |
Remove unnecessary classes / modules used by config (#1897)
* Remove` Pry::Config::Default`
* Remove `Pry::Config::Memoization`
* Remove confusing use of `instance_eval`
* Add `Pry::Config.defaults`
Returns an instance of `Pry::Config`, initialized with Pry defaults.
Replaces the previous role of `Pry::Config::Default`.
Diffstat (limited to 'spec/config')
-rw-r--r-- | spec/config/memoization_spec.rb | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/spec/config/memoization_spec.rb b/spec/config/memoization_spec.rb deleted file mode 100644 index 59a3353e..00000000 --- a/spec/config/memoization_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -RSpec.describe Pry::Config::Memoization do - let(:config) do - Class.new do - include Pry::Config::Memoization - def_memoized({foo: proc { "foo" }, bar: proc { "bar" }}) - end.new - end - - describe "on call of method" do - it "memoizes the return value" do - expect(config.foo).to be(config.foo) - end - end - - describe "#memoized_methods" do - it "tracks a list of memoized methods" do - expect(config.memoized_methods).to eq([:foo, :bar]) - end - end -end |