Sha256: af8af338171eb3e09d5ce6f7dc9ff8a89a2c2f851d4ffcba01975062d25ccfc1

Contents?: true

Size: 511 Bytes

Versions: 3

Compression:

Stored size: 511 Bytes

Contents

module Spec #:nodoc:
  module Matchers #:nodoc:
    class Have #:nodoc:
      alias_method :__original_failure_message, :failure_message
      def failure_message
        return "expected #{relativities[@relativity]}#{@expected} errors on :#{@args[0]}, got #{@actual}" if @collection_name == :errors_on
        return "expected #{relativities[@relativity]}#{@expected} error on :#{@args[0]}, got #{@actual}" if @collection_name == :error_on
        return __original_failure_message
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
has_finder-0.1.1 spec/rails/vendor/plugins/rspec_on_rails/lib/spec/matchers/have.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec_on_rails/lib/spec/matchers/have.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec_on_rails/lib/spec/matchers/have.rb