You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1018 B
30 lines
1018 B
commit fb1a829d173a633446c56b4d0ed665312882e83b
|
|
Author: Brian Donovan <me@brian-donovan.com>
|
|
Date: Tue Sep 20 09:31:49 2011 -0700
|
|
|
|
Replace ARGV with an empty array before each spec run.
|
|
|
|
Some of the specs were leaving ARGV in a non-pristine state (such as
|
|
those in runner_spec.rb), which was then implicitly used in
|
|
Thor::Base.start et al. It happened to be the case that the order in
|
|
which rspec was loading and running the specs made this not a problem,
|
|
but if the specs were run in a randomized order it could be a problem.
|
|
|
|
Closes #171.
|
|
|
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
|
|
index 00181ad..175637d 100644
|
|
--- a/spec/spec_helper.rb
|
|
+++ b/spec/spec_helper.rb
|
|
@@ -29,6 +29,10 @@ load File.join(File.dirname(__FILE__), "fixtures", "script.thor")
|
|
load File.join(File.dirname(__FILE__), "fixtures", "invoke.thor")
|
|
|
|
RSpec.configure do |config|
|
|
+ config.before :each do
|
|
+ ARGV.replace []
|
|
+ end
|
|
+
|
|
def capture(stream)
|
|
begin
|
|
stream = stream.to_s
|