lib/konacha/runner.rb in konacha-1.5.0 vs lib/konacha/runner.rb in konacha-1.5.1

- old
+ new

@@ -38,11 +38,11 @@ def failed_examples examples.select { |example| example.failed? } end def passed? - examples.all? { |example| example.passed? } + examples.all? { |example| example.passed? || example.pending? } end def failure_messages examples.map { |example| example.failure_message }.compact end @@ -100,13 +100,11 @@ @examples = JSON.parse(session.evaluate_script('Konacha.getResults()')).map do |row| Example.new(row) end rescue => e - msg = [e.inspect] - msg << e.message unless e.message.blank? - raise Konacha::Error, "Error communicating with browser process:\n#{msg.join("\n")}" + raise e, "Error communicating with browser process: #{e}", e.backtrace end end class Example def initialize(row) @@ -137,7 +135,13 @@ end end end class Error < StandardError + attr_accessor :original + + def initialize(msg, original=nil); + super(msg); + @original = original; + end end end