Class: Spec::Matchers::Have
- Inherits:
-
Object
- Object
- Spec::Matchers::Have
- Defined in:
- lib/spec/rails/extensions/spec/matchers/have.rb
Overview
:nodoc:
Instance Method Summary collapse
- #description_with_errors_on_extensions ⇒ Object
- #failure_message_for_should_with_errors_on_extensions ⇒ Object
Instance Method Details
#description_with_errors_on_extensions ⇒ Object
14 15 16 17 18 |
# File 'lib/spec/rails/extensions/spec/matchers/have.rb', line 14 def description_with_errors_on_extensions return "have #{relativities[@relativity]}#{@expected} errors on :#{@args[0]}" if @collection_name == :errors_on return "have #{relativities[@relativity]}#{@expected} error on :#{@args[0]}" if @collection_name == :error_on return description_without_errors_on_extensions end |
#failure_message_for_should_with_errors_on_extensions ⇒ Object
7 8 9 10 11 |
# File 'lib/spec/rails/extensions/spec/matchers/have.rb', line 7 def 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 end |