diff --git a/lib/mspec/mocks/mock.rb b/lib/mspec/mocks/mock.rb index 04bc1e0..c61ba35 100644 --- a/lib/mspec/mocks/mock.rb +++ b/lib/mspec/mocks/mock.rb @@ -19,7 +19,7 @@ def self.stubs end def self.replaced_name(key) - :"__mspec_#{key.first}_#{key.last}__" + :"__mspec_#{key.last}__" end def self.replaced_key(obj, sym) diff --git a/spec/mocks/mock_spec.rb b/spec/mocks/mock_spec.rb index a971e4c..7426e0f 100644 --- a/spec/mocks/mock_spec.rb +++ b/spec/mocks/mock_spec.rb @@ -22,7 +22,7 @@ RSpec.describe Mock, ".replaced_name" do it "returns the name for a method that is being replaced by a mock method" do m = double('a fake id') - expect(Mock.replaced_name(Mock.replaced_key(m, :method_call))).to eq(:"__mspec_#{m.object_id}_method_call__") + expect(Mock.replaced_name(Mock.replaced_key(m, :method_call))).to eq(:"__mspec_method_call__") end end