Skip to content

Commit c8cf8a0

Browse files
alexbeekenstas
authored andcommitted
Update attributes.rb
check if attribute key exists instead of checking if attribute value exists, addresses case of attribute value being nil
1 parent 20c17cc commit c8cf8a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi/rspec/attributes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module Attributes
2929
end
3030

3131
failure_message do |_doc|
32-
if @actual
32+
if @has_attribute
3333
"expected `#{attr_name}` attribute " \
3434
"to have value `#{@expected}` but was `#{@actual}`"
3535
else

0 commit comments

Comments
 (0)