lib/matchers/document.rb in glebtv-mongoid-rspec-1.12.0 vs lib/matchers/document.rb in glebtv-mongoid-rspec-3.0.0

- old
+ new

@@ -68,9 +68,12 @@ def failure_message_for_should_not "Expected #{@klass.inspect} to not #{description}, got #{@klass.inspect} to #{description}" end + alias :failure_message :failure_message_for_should + alias :failure_message_when_negated :failure_message_for_should_not + def description desc = "have #{@attributes.size > 1 ? 'fields' : 'field'} named #{@attributes.collect(&:inspect).to_sentence}" desc << " of type #{@type.inspect}" if @type desc << " with alias #{@field_alias}" if @field_alias desc << " with default value of #{@default.inspect}" if !@default.nil?