rspec messages working now
This commit is contained in:
parent
890858e40b
commit
e365c08940
|
@ -153,19 +153,20 @@ module Hydra #:nodoc:
|
||||||
rescue LoadError => ex
|
rescue LoadError => ex
|
||||||
return ex.to_s
|
return ex.to_s
|
||||||
end
|
end
|
||||||
hydra_output = StringIO.new
|
@hydra_output ||= StringIO.new
|
||||||
|
@hydra_output.rewind
|
||||||
|
@hydra_output.truncate(0)
|
||||||
|
|
||||||
config = [ '-f', 'progress', file ]
|
config = [ file ]
|
||||||
|
RSpec.reset
|
||||||
RSpec.world.reset
|
|
||||||
begin
|
begin
|
||||||
result = RSpec::Core::Runner.run(config, hydra_output, hydra_output)
|
result = RSpec::Core::Runner.run(config, $stdout, @hydra_output)
|
||||||
rescue Exception => ex
|
rescue Exception => ex
|
||||||
return ex.to_s + "\n" + ex.backtrace.join("\n")
|
return ex.to_s + "\n" + ex.backtrace.join("\n")
|
||||||
end
|
end
|
||||||
hydra_output.rewind
|
@hydra_output.rewind
|
||||||
|
|
||||||
return (result == 1) ? hydra_output.read : ""
|
return (result == 1) ? @hydra_output.read : ""
|
||||||
end
|
end
|
||||||
|
|
||||||
# run all the scenarios in a cucumber feature file
|
# run all the scenarios in a cucumber feature file
|
||||||
|
|
Loading…
Reference in New Issue