Sha256: e9182b04a572246b18cfb2903f725564f434b99aed13ad8a4ba385b5602eabc6

Contents?: true

Size: 561 Bytes

Versions: 26

Compression:

Stored size: 561 Bytes

Contents

module Shoulda
  module Matchers
    module ActiveModel
      class AllowValueMatcher
        # @private
        class AttributeDoesNotExistError < Shoulda::Matchers::Error
          attr_accessor :model, :attribute_name, :value

          def message
            Shoulda::Matchers.word_wrap <<-MESSAGE
The matcher attempted to set :#{attribute_name} on the #{model.name} to
#{value.inspect}, but that attribute does not exist.
            MESSAGE
          end

          def successful?
            false
          end
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
shoulda-matchers-6.4.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-6.3.1 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-6.3.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-6.2.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-6.1.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-6.0.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-5.3.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-5.2.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-5.1.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-5.0.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-5.0.0.rc1 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.5.1 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.5.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.4.1 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.4.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.3.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.2.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.1.2 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.1.1 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb
shoulda-matchers-4.1.0 lib/shoulda/matchers/active_model/allow_value_matcher/attribute_does_not_exist_error.rb