Typo fix
This commit is contained in:
parent
9822760355
commit
1dbf71bfe5
|
@ -603,7 +603,7 @@ pass, or do something else entirely.
|
|||
def inspected_values_to_set
|
||||
Shoulda::Matchers::Util.inspect_values(values_to_set).to_sentence(
|
||||
two_words_connector: " or ",
|
||||
last_word_connector: ", or"
|
||||
last_word_connector: ", or "
|
||||
)
|
||||
end
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ end
|
|||
|
||||
describe Shoulda::Matchers::ActiveModel::AllowValueMatcher, type: :model do
|
||||
context "#description" do
|
||||
it 'describes itself with multiple values' do
|
||||
it 'describes itself with two values' do
|
||||
matcher = allow_value('foo', 'bar').for(:baz)
|
||||
|
||||
expect(matcher.description).to eq(
|
||||
|
@ -18,6 +18,14 @@ describe Shoulda::Matchers::ActiveModel::AllowValueMatcher, type: :model do
|
|||
)
|
||||
end
|
||||
|
||||
it 'describes itself with more than two values' do
|
||||
matcher = allow_value('foo', 'bar', 'qux').for(:baz)
|
||||
|
||||
expect(matcher.description).to eq(
|
||||
'allow :baz to be ‹"foo"›, ‹"bar"›, or ‹"qux"›'
|
||||
)
|
||||
end
|
||||
|
||||
it 'describes itself with a single value' do
|
||||
matcher = allow_value('foo').for(:baz)
|
||||
|
||||
|
|
Loading…
Reference in New Issue