Adjust message for AttributeDoesNotExistError
Make it a little more clear that the attribute mentioned is on the model.
This commit is contained in:
parent
830881bbed
commit
a4a8a5afce
|
@ -8,8 +8,8 @@ module Shoulda
|
|||
|
||||
def message
|
||||
Shoulda::Matchers.word_wrap <<-MESSAGE
|
||||
The matcher attempted to set :#{attribute_name} to #{value.inspect} on
|
||||
the #{model.name}, but that attribute does not exist.
|
||||
The matcher attempted to set :#{attribute_name} on the #{model.name} to
|
||||
#{value.inspect}, but that attribute does not exist.
|
||||
MESSAGE
|
||||
end
|
||||
|
||||
|
|
|
@ -556,7 +556,7 @@ invalid and to raise a validation exception with message matching
|
|||
end
|
||||
|
||||
message = <<-MESSAGE.rstrip
|
||||
The matcher attempted to set :nonexistent to "foo" on the Example, but
|
||||
The matcher attempted to set :nonexistent on the Example to "foo", but
|
||||
that attribute does not exist.
|
||||
MESSAGE
|
||||
|
||||
|
@ -576,7 +576,7 @@ that attribute does not exist.
|
|||
end
|
||||
|
||||
message = <<-MESSAGE.rstrip
|
||||
The matcher attempted to set :nonexistent to "foo" on the Example, but
|
||||
The matcher attempted to set :nonexistent on the Example to "foo", but
|
||||
that attribute does not exist.
|
||||
MESSAGE
|
||||
|
||||
|
@ -603,8 +603,8 @@ that attribute does not exist.
|
|||
end
|
||||
|
||||
message = <<-MESSAGE.rstrip
|
||||
The matcher attempted to set :nonexistent to "some value" on the
|
||||
Example, but that attribute does not exist.
|
||||
The matcher attempted to set :nonexistent on the Example to "some
|
||||
value", but that attribute does not exist.
|
||||
MESSAGE
|
||||
|
||||
expect(&assertion).to raise_error(
|
||||
|
@ -629,8 +629,8 @@ Example, but that attribute does not exist.
|
|||
end
|
||||
|
||||
message = <<-MESSAGE.rstrip
|
||||
The matcher attempted to set :nonexistent to "some value" on the
|
||||
Example, but that attribute does not exist.
|
||||
The matcher attempted to set :nonexistent on the Example to "some
|
||||
value", but that attribute does not exist.
|
||||
MESSAGE
|
||||
|
||||
expect(&assertion).to raise_error(
|
||||
|
|
|
@ -38,8 +38,8 @@ describe Shoulda::Matchers::ActiveModel::ValidateConfirmationOfMatcher, type: :m
|
|||
end
|
||||
|
||||
message = <<-MESSAGE.rstrip
|
||||
The matcher attempted to set :attribute_to_confirm_confirmation to "some
|
||||
value" on the Example, but that attribute does not exist.
|
||||
The matcher attempted to set :attribute_to_confirm_confirmation on the
|
||||
Example to "some value", but that attribute does not exist.
|
||||
MESSAGE
|
||||
|
||||
expect(&assertion).to raise_error(
|
||||
|
@ -58,8 +58,8 @@ value" on the Example, but that attribute does not exist.
|
|||
end
|
||||
|
||||
message = <<-MESSAGE.rstrip
|
||||
The matcher attempted to set :attribute_to_confirm to "different value"
|
||||
on the Example, but that attribute does not exist.
|
||||
The matcher attempted to set :attribute_to_confirm on the Example to
|
||||
"different value", but that attribute does not exist.
|
||||
MESSAGE
|
||||
|
||||
expect(&assertion).to raise_error(
|
||||
|
|
Loading…
Reference in New Issue