lib/volt/utils/promise_extensions.rb in volt-0.9.5.pre3 vs lib/volt/utils/promise_extensions.rb in volt-0.9.5.pre4

- old
+ new

@@ -1,8 +1,5 @@ -# Require the original promise library first. -require 'volt/utils/promise' - # A temp patch for promises until https://github.com/opal/opal/pull/725 is released. class Promise class UnrealizedPromiseException < RuntimeError ; end # We made a choice not to support comparitors and << and >> on method_missing # on Promises. This makes it easier to understand what promise proxying does @@ -111,9 +108,13 @@ end.fail do |err| error = err end if error + if error.is_a?(RSpec::Expectations::ExpectationNotMetError) + # re-raise + raise error + end err_str = "Exception in Promise at .sync: #{error.inspect}" err_str += error.backtrace.join("\n") if error.respond_to?(:backtrace) Volt.logger.error(err_str) # The fail method in Promise is already defined, to re-raise the error,