lib/spec/rails/extensions/spec/matchers/have.rb in dchelimsky-rspec-rails-1.1.8 vs lib/spec/rails/extensions/spec/matchers/have.rb in dchelimsky-rspec-rails-1.1.9
- old
+ new
@@ -3,11 +3,11 @@
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 "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 __original_failure_message
end
alias_method :__original_description, :description
def description