Skip to content

Commit

Permalink
remove unnecessary indirection
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Jan 16, 2012
1 parent 192cd02 commit bf848ec
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions lib/rspec/core/runner.rb
Expand Up @@ -60,27 +60,17 @@ def self.run(args, err=$stderr, out=$stdout)

if options.options[:drb]
begin
run_over_drb(options, err, out)
DRbCommandLine.new(options).run(err, out)
rescue DRb::DRbConnError
err.puts "No DRb server is running. Running in local process instead ..."
run_in_process(options, err, out)
CommandLine.new(options).run(err, out)
end
else
run_in_process(options, err, out)
CommandLine.new(options).run(err, out)
end
ensure
RSpec.reset
end

def self.run_over_drb(options, err, out)
DRbCommandLine.new(options).run(err, out)
end

def self.run_in_process(options, err, out)
CommandLine.new(options, RSpec::configuration, RSpec::world).run(err, out)
end

end

end
end

0 comments on commit bf848ec

Please sign in to comment.