Sha256: 6861ebfefd937fe70b4e5a0c1b502e08e78d1c5fe39e682154ae23f2f131bf4e

Contents?: true

Size: 1012 Bytes

Versions: 13

Compression:

Stored size: 1012 Bytes

Contents

# frozen_string_literal: true
module ActiveMocker
  class BaseError < StandardError
  end
  class RecordNotFound < BaseError
  end
  class RecordNotUnique < BaseError
  end

  module Mock
    # @deprecated
    RecordNotFound = ActiveMocker::RecordNotFound
  end

  class IdError < BaseError
  end

  # 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 UpdateMocksError < BaseError
    def initialize(name, mock_build_version, mock_current_version)
      super("#{name} was built with #{mock_build_version} but the mock current version is #{mock_current_version}. Run `rake active_mocker:build` to update.")
    end
  end

  class NotImplementedError < BaseError
  end

  class Error < BaseError
  end

  class MockNotLoaded < BaseError
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
active_mocker-2.6.2 lib/active_mocker/mock/exceptions.rb
active_mocker-2.6.1.beta2 lib/active_mocker/mock/exceptions.rb
active_mocker-2.6.1.beta lib/active_mocker/mock/exceptions.rb
active_mocker-2.6.0 lib/active_mocker/mock/exceptions.rb
active_mocker-2.5.4 lib/active_mocker/mock/exceptions.rb
active_mocker-2.5.3 lib/active_mocker/mock/exceptions.rb
active_mocker-2.5.2 lib/active_mocker/mock/exceptions.rb
active_mocker-2.5.1 lib/active_mocker/mock/exceptions.rb
active_mocker-2.5.1.pre lib/active_mocker/mock/exceptions.rb
active_mocker-2.5.0 lib/active_mocker/mock/exceptions.rb
active_mocker-2.4.4 lib/active_mocker/mock/exceptions.rb
active_mocker-2.4.3 lib/active_mocker/mock/exceptions.rb
active_mocker-2.4.2 lib/active_mocker/mock/exceptions.rb