lib/ruby_ext/should.rb in ruby-ext-0.2.6 vs lib/ruby_ext/should.rb in ruby-ext-0.2.7

- old
+ new

@@ -2,11 +2,11 @@ Object.class_eval do def should_be! method unless self.send("#{method}?") == true raise AssertionError, " - ASSERTION FAILED: + ASSERTION FAILED (#{caller[0]}): #{self.inspect} should be #{method} ", caller end return self @@ -14,11 +14,11 @@ alias_method :should_have!, :should_be! def should_not_be! method unless self.send("#{method}?") == false raise AssertionError, " - ASSERTION FAILED: + ASSERTION FAILED (#{caller[0]}): #{self.inspect} should not be #{method} ", caller end return self @@ -78,16 +78,16 @@ end unless result unless arg.equal? NotDefined raise AssertionError, " - ASSERTION FAILED: + ASSERTION FAILED (#{caller[0]}): #{self.inspect} should #{cmd} #{arg.inspect} ", caller else raise AssertionError, " - ASSERTION FAILED: + ASSERTION FAILED (#{caller[0]}): #{self.inspect} should #{cmd} ", caller end end @@ -148,15 +148,15 @@ end if result unless arg.equal? NotDefined raise AssertionError, " - ASSERTION FAILED: + ASSERTION FAILED (#{caller[0]}): #{self.inspect} should not #{cmd} #{arg.inspect} ", caller else raise AssertionError, " - ASSERTION FAILED: + ASSERTION FAILED (#{caller[0]}): #{self.inspect} should not #{cmd} ", caller end end \ No newline at end of file