Use correct variable in validate_confirmation_of matcher description
This commit is contained in:
parent
4b91ea3c16
commit
632b4cfa70
|
@ -24,7 +24,7 @@ module Shoulda # :nodoc:
|
|||
end
|
||||
|
||||
def description
|
||||
"require #{@base_attribute} to match #{@attribute}"
|
||||
"require #{@confirmation} to match #{@attribute}"
|
||||
end
|
||||
|
||||
def matches?(subject)
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Shoulda::Matchers::ActiveModel::ValidateConfirmationOfMatcher do
|
||||
context '#description' do
|
||||
it 'states that the confirmation must match its base attribute' do
|
||||
matcher.description.should == 'require attr_confirmation to match attr'
|
||||
end
|
||||
end
|
||||
|
||||
context 'a model with a confirmation validation' do
|
||||
it 'accepts' do
|
||||
validating_confirmation.should matcher
|
||||
|
|
Loading…
Reference in New Issue