lib/micronaut/expectations.rb in spicycode-micronaut-0.1.2 vs lib/micronaut/expectations.rb in spicycode-micronaut-0.1.3

- old
+ new

@@ -1,8 +1,8 @@ require 'micronaut/matchers' -require 'micronaut/expectations/errors' -require 'micronaut/expectations/extensions' +require 'micronaut/expectations/extensions/object' +require 'micronaut/expectations/extensions/string_and_symbol' require 'micronaut/expectations/handler' require 'micronaut/expectations/wrap_expectation' module Micronaut @@ -29,16 +29,18 @@ # +true+, then the spec fails with the message returned by <tt>matcher.negative_failure_message</tt>. # # Micronaut ships with a standard set of useful matchers, and writing your own # matchers is quite simple. See Micronaut::Matchers for details. module Expectations + + class ExpectationNotMetError < ::StandardError; end def self.fail_with(message, expected=nil, target=nil) # :nodoc: if Array === message && message.length == 3 message, expected, target = message[0], message[1], message[2] end Kernel::raise(Micronaut::Expectations::ExpectationNotMetError.new(message)) end end -end \ No newline at end of file +end