extracted the spec override from the formatter and change the requirement style so as not to kill test::unit files

This commit is contained in:
Nick Gauthier 2010-04-06 10:13:32 -04:00
parent 480d9ee163
commit bf8c75dfe3
7 changed files with 19 additions and 9 deletions

View File

@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Gauthier"]
s.date = %q{2010-04-05}
s.date = %q{2010-04-06}
s.description = %q{Spread your tests over multiple machines to test your code faster.}
s.email = %q{nick@smartlogicsolutions.com}
s.extra_rdoc_files = [
@ -46,6 +46,7 @@ Gem::Specification.new do |s|
"lib/hydra/pipe.rb",
"lib/hydra/runner.rb",
"lib/hydra/safe_fork.rb",
"lib/hydra/spec/autorun_override.rb",
"lib/hydra/spec/hydra_formatter.rb",
"lib/hydra/ssh.rb",
"lib/hydra/stdio.rb",

View File

@ -107,6 +107,8 @@ module Hydra #:nodoc:
begin
require 'spec'
require 'hydra/spec/hydra_formatter'
# Ensure we override rspec's at_exit
require 'hydra/spec/autorun_override'
rescue LoadError => ex
return ex.to_s
end

View File

@ -0,0 +1,12 @@
if defined?(Spec)
module Spec
module Runner
class << self
# stop the auto-run at_exit
def run
return 0
end
end
end
end
end

View File

@ -1,13 +1,6 @@
require 'spec/autorun'
require 'spec/runner/formatter/progress_bar_formatter'
module Spec
module Runner
class << self
# stop the auto-run at_exit
def run
return 0
end
end
module Formatter
class HydraFormatter < ProgressBarFormatter
# Stifle the post-test summary

View File

@ -73,7 +73,7 @@ module Hydra #:nodoc:
yield self if block_given?
# Ensure we override rspec's at_exit
require 'hydra/spec/hydra_formatter'
require 'hydra/spec/autorun_override'
@config = find_config_file

View File

@ -1,4 +1,5 @@
require 'tmpdir'
require 'spec'
context "file writing" do
it "writes to a file" do
File.open(File.join(Dir.tmpdir, 'alternate_hydra_test.txt'), 'a') do |f|

View File

@ -1,4 +1,5 @@
require 'tmpdir'
require 'spec'
context "file writing" do
it "writes to a file" do
File.open(File.join(Dir.tmpdir, 'hydra_test.txt'), 'a') do |f|