Updated to latest rspec
[gitorious:georgyos-clone.git] / vendor / plugins / rspec / lib / spec.rb
1 require 'spec/version'
2 require 'spec/matchers'
3 require 'spec/expectations'
4 require 'spec/example'
5 require 'spec/extensions'
6 require 'spec/runner'
7 require 'spec/adapters'
8
9 if Object.const_defined?(:Test); \
10   require 'spec/interop/test'; \
11 end
12
13 module Spec
14   class << self
15     def run?
16       @run || rspec_options.examples_run?
17     end
18
19     def run; \
20       return true if run?; \
21       result = rspec_options.run_examples; \
22       @run = true; \
23       result; \
24     end
25     attr_writer :run
26     
27     def exit?; \
28       !Object.const_defined?(:Test) || Test::Unit.run?; \
29     end
30   end
31 end