File: allow_value_matcher_helpers.rb

package info (click to toggle)
ruby-shoulda-matchers 7.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,652 kB
  • sloc: ruby: 34,046; sh: 280; makefile: 9
file content (19 lines) | stat: -rw-r--r-- 683 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require_relative '../record_with_different_error_attribute_builder'
require_relative '../record_builder_with_i18n_validation_message'

module UnitTests
  module AllowValueMatcherHelpers
    def builder_for_record_with_different_error_attribute(options = {})
      RecordWithDifferentErrorAttributeBuilder.new(options)
    end

    def builder_for_record_with_unrelated_error(options = {})
      RecordWithUnrelatedErrorBuilder.new(options)
    end

    def builder_for_record_with_different_error_attribute_using_i18n(options = {})
      builder = builder_for_record_with_different_error_attribute(options)
      RecordBuilderWithI18nValidationMessage.new(builder)
    end
  end
end