lib/active_mocker/mock/exceptions.rb in active_mocker-1.5.2 vs lib/active_mocker/mock/exceptions.rb in active_mocker-1.6

- old
+ new

@@ -10,16 +10,29 @@ end class FileTypeMismatchError < StandardError end - class RejectedParams < Exception + # Raised when unknown attributes are supplied via mass assignment. + class UnknownAttributeError < NoMethodError + + attr_reader :record, :attribute + + def initialize(record, attribute) + @record = record + @attribute = attribute.to_s + super("unknown attribute: #{attribute}") + end + end class Unimplemented < Exception end class IdNotNumber < Exception + end + + class Error < Exception end end end