summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0xAB <0xAB@protonmail.com>2017-08-20 14:59:31 +0100
committer0xAB <0xAB@protonmail.com>2017-08-20 15:04:31 +0100
commit4a4ab2958c5364f5344364023865b5d0ec2c51f5 (patch)
treeca1c8f3c0ece6b98cf02dd9b8e7fd6752b45b1cf
parente98e852bc16d728d4f1207e8ce0ba0103a167877 (diff)
downloadpry-4a4ab2958c5364f5344364023865b5d0ec2c51f5.tar.gz
update CHANGELOG.md, modify testcase
-rw-r--r--CHANGELOG.md2
-rw-r--r--spec/wrapped_module_spec.rb8
2 files changed, 7 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bb8faefb..332a5993 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
* Add text helpers for background colors ([#1624](https://github.com/pry/pry/pull/1624))
* Fix string literal methods completion. ([#1590](https://github.com/pry/pry/pull/1590))
+* Make sure Pry::WrappedModule::Candidate#source_location returns non-nil value when `.name` has
+ been redefined on a Class/Module ([#1623](https://github.com/pry/pry/pull/1623))
* Add alias 'whereami[?!]+' for 'whereami' command. ([#1597](https://github.com/pry/pry/pull/1597))
* Improve Ruby 2.4 support ([#1611](https://github.com/pry/pry/pull/1611)):
* Deprecated constants are hidden from `ls` output by default, use the `-d` switch to see them.
diff --git a/spec/wrapped_module_spec.rb b/spec/wrapped_module_spec.rb
index ae4658b9..2482fd28 100644
--- a/spec/wrapped_module_spec.rb
+++ b/spec/wrapped_module_spec.rb
@@ -42,9 +42,11 @@ describe Pry::WrappedModule do
end
describe 'overidden Module#name' do
- it 'should resolve correct name' do
- wm = Pry::WrappedModule(Host::ModuleNameOverride)
- expect(wm.candidate(0).source_location).not_to be_nil
+ specify '#source_location does not return nil' do
+ c = Pry::WrappedModule(Host::ModuleNameOverride).candidate(0)
+ expect(c.wrapped).to eq(Host::ModuleNameOverride)
+ expect(c.nonblank_name).to eq(Host::ModuleNameOverride.name)
+ expect(c.source_location).not_to be_nil
end
end