spec/lib/sinclair/equals_checker_spec.rb in sinclair-1.16.0 vs spec/lib/sinclair/equals_checker_spec.rb in sinclair-1.16.1
- old
+ new
@@ -117,9 +117,21 @@
it do
expect(checker).not_to be_match(model1, model2)
end
end
end
+
+ context 'when one of the attributes is an instance variable' do
+ let(:attributes) { %i[name @age] }
+
+ context 'when the instance variable is different and the method the same' do
+ let(:name2) { name1 }
+
+ it do
+ expect(checker).not_to be_match(model1, model2)
+ end
+ end
+ end
end
describe '#add' do
let(:attributes) { [:name] }
let(:new_attributes) { [:age] }