mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
f922613386
* Change 'spec' Rake task to 'spec:unit' * Require unit_spec_helper.rb in unit tests, not spec_helper.rb * Re-namespace files in spec/support/unit under UnitTests * Files in spec/support/unit/helpers no longer automatically add themselves to RSpec - this happens in unit_spec_helper.rb * Extract RecordWithDifferentErrorAttributeBuilder and RecordValidatingConfirmationBuilder to separate files
17 lines
590 B
Ruby
17 lines
590 B
Ruby
require_relative '../record_validating_confirmation_builder'
|
|
require_relative '../record_builder_with_i18n_validation_message'
|
|
|
|
module UnitTests
|
|
module ConfirmationMatcherHelpers
|
|
def builder_for_record_validating_confirmation(options = {})
|
|
RecordValidatingConfirmationBuilder.new(options)
|
|
end
|
|
|
|
def builder_for_record_validating_confirmation_with_18n_message(options = {})
|
|
builder = builder_for_record_validating_confirmation(options)
|
|
RecordBuilderWithI18nValidationMessage.new(builder,
|
|
validation_message_key: :confirmation
|
|
)
|
|
end
|
|
end
|
|
end
|