Sha256: ea88ed30b24de2984479e7d4d8c0d6845a2c3a56cc38190fb84aa169c122c7e0
Contents?: true
Size: 1019 Bytes
Versions: 5
Compression:
Stored size: 1019 Bytes
Contents
require 'spec/matchers/have' module Spec #:nodoc: module Matchers #:nodoc: class Have #:nodoc: def failure_message_with_errors_on_extensions return "expected #{relativities[@relativity]}#{@expected} errors on :#{@args[0]}, got #{@given}" if @collection_name == :errors_on return "expected #{relativities[@relativity]}#{@expected} error on :#{@args[0]}, got #{@given}" if @collection_name == :error_on return failure_message_without_errors_on_extensions end alias_method_chain :failure_message, :errors_on_extensions def description_with_errors_on_extensions return "should have #{relativities[@relativity]}#{@expected} errors on :#{@args[0]}" if @collection_name == :errors_on return "should have #{relativities[@relativity]}#{@expected} error on :#{@args[0]}" if @collection_name == :error_on return description_without_errors_on_extensions end alias_method_chain :description, :errors_on_extensions end end end
Version data entries
5 entries across 5 versions & 2 rubygems