summaryrefslogtreecommitdiffstats
path: root/test/lib/spec/runner/command_line.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-23 00:56:42 -0500
committerLuke Kanies <luke@madstop.com>2007-08-23 00:56:42 -0500
commit5601ecf75d3854a66d087a108e1b06885fa2be12 (patch)
tree28d5892bab14c9296bcd4232075f3658ee1224a0 /test/lib/spec/runner/command_line.rb
parent7c4d39ec09c10871d7eb234fe4392381245ff443 (diff)
Upgrading rspec to version 1.0.8. This only includes the contents of the lib directory, and even then only the spec-related stuff, not the autotest stuff.
Diffstat (limited to 'test/lib/spec/runner/command_line.rb')
-rw-r--r--test/lib/spec/runner/command_line.rb24
1 files changed, 6 insertions, 18 deletions
diff --git a/test/lib/spec/runner/command_line.rb b/test/lib/spec/runner/command_line.rb
index db928ad9b..0d70337e1 100644
--- a/test/lib/spec/runner/command_line.rb
+++ b/test/lib/spec/runner/command_line.rb
@@ -10,25 +10,13 @@ module Spec
# +warn_if_no_files+ tells whether or not a warning (the help message)
# should be printed to +err+ in case no files are specified.
def self.run(argv, err, out, exit=true, warn_if_no_files=true)
- old_context_runner = defined?($context_runner) ? $context_runner : nil
- $context_runner = OptionParser.new.create_context_runner(argv, err, out, warn_if_no_files)
- return if $context_runner.nil? # This is the case if we use --drb
+ old_behaviour_runner = defined?($behaviour_runner) ? $behaviour_runner : nil
+ $behaviour_runner = OptionParser.new.create_behaviour_runner(argv, err, out, warn_if_no_files)
+ return if $behaviour_runner.nil? # This is the case if we use --drb
- # If ARGV is a glob, it will actually each over each one of the matching files.
- argv.each do |file_or_dir|
- if File.directory?(file_or_dir)
- Dir["#{file_or_dir}/**/*.rb"].each do |file|
- load file
- end
- elsif File.file?(file_or_dir)
- load file_or_dir
- else
- raise "File or directory not found: #{file_or_dir}"
- end
- end
- $context_runner.run(exit)
- $context_runner = old_context_runner
+ $behaviour_runner.run(argv, exit)
+ $behaviour_runner = old_behaviour_runner
end
end
end
-end \ No newline at end of file
+end