vendor/plugins/rspec/lib/spec.rb in typo-5.1.3 vs vendor/plugins/rspec/lib/spec.rb in typo-5.1.98
- old
+ new
@@ -1,30 +1,32 @@
-require 'spec/version'
require 'spec/matchers'
require 'spec/expectations'
require 'spec/example'
require 'spec/extensions'
require 'spec/runner'
+require 'spec/adapters'
+require 'spec/version'
-if Object.const_defined?(:Test); \
- require 'spec/interop/test'; \
+if Object.const_defined?(:Test)
+ require 'spec/interop/test'
end
module Spec
class << self
def run?
- @run || rspec_options.examples_run?
+ Runner.options.examples_run?
end
- def run; \
- return true if run?; \
- result = rspec_options.run_examples; \
- @run = true; \
- result; \
+ def run
+ return true if run?
+ Runner.options.run_examples
end
- attr_writer :run
- def exit?; \
- !Object.const_defined?(:Test) || Test::Unit.run?; \
+ def exit?
+ !Object.const_defined?(:Test) || Test::Unit.run?
end
+
+ def spec_command?
+ $0.split('/').last == 'spec'
+ end
end
-end
\ No newline at end of file
+end