summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-11-13 19:56:22 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-11-13 19:57:13 +0800
commit45e1939e190ef6a173fa5fd4f9a20f99f3a839d0 (patch)
tree966c7c443fb99dcba517727048700c6880920be3
parent32c2688e8284760a20b3bdb7d645c978c6fc9268 (diff)
downloadgitlab-ce-39842-fetch-ivar.tar.gz
Make sure all the values are identical39842-fetch-ivar
-rw-r--r--spec/lib/gitlab/utils/strong_memoize_spec.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/lib/gitlab/utils/strong_memoize_spec.rb b/spec/lib/gitlab/utils/strong_memoize_spec.rb
index 6ade4ba5d44..4a104ab6d97 100644
--- a/spec/lib/gitlab/utils/strong_memoize_spec.rb
+++ b/spec/lib/gitlab/utils/strong_memoize_spec.rb
@@ -31,12 +31,11 @@ describe Gitlab::Utils::StrongMemoize do
expect(object.trace).to contain_exactly(value)
end
- it 'defines the instance variable for the exact value' do
- object.method_name
-
+ it 'returns and defines the instance variable for the exact value' do
+ returned_value = object.method_name
memoized_value = object.instance_variable_get(:@method_name)
- expect(memoized_value).to eq(value)
+ expect(returned_value).to eql(value)
expect(memoized_value).to eql(value)
end
end