Browse files

Merge pull request #255 from manafire/rspec3_runner

Uninitialized constant RSpec::Core::CommandLine
  • Loading branch information...
2 parents a94412c + e1c5ac9 commit 224df492657e617a0c93c0319e78f0eefee5b636 @timcharper timcharper committed Dec 1, 2014
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/spork/test_framework/rspec.rb
View
8 lib/spork/test_framework/rspec.rb
@@ -7,11 +7,19 @@ def run_tests(argv, stderr, stdout)
::Spec::Runner::CommandLine.run(
::Spec::Runner::OptionParser.parse(argv, stderr, stdout)
)
+ elsif rspec3?
+ options = ::RSpec::Core::ConfigurationOptions.new(argv)
+ ::RSpec::Core::Runner.new(options).run(stderr, stdout)
else
::RSpec::Core::CommandLine.new(argv).run(stderr, stdout)
end
end
+ def rspec3?
+ return false if !defined?(::RSpec::Core::Version::STRING)
+ ::RSpec::Core::Version::STRING =~ /^3\./
+ end
+
def rspec1?
defined?(Spec) && !defined?(RSpec)
end

0 comments on commit 224df49

Please sign in to comment.