Sha256: 319d70752f3a87b043295a7ab24f9067cbf547d8371398a361e0710555d13883
Contents?: true
Size: 746 Bytes
Versions: 5
Compression:
Stored size: 746 Bytes
Contents
require 'bundler' Bundler.setup require 'rspec/rails' Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} # TODO - most of this is borrowed from rspec-core's spec_helper - should # be extracted to something we can use here def in_editor? ENV.has_key?('TM_MODE') || ENV.has_key?('EMACS') || ENV.has_key?('VIM') end class RSpec::Core::ExampleGroup def self.run_all(reporter=nil) run(reporter || RSpec::Mocks::Mock.new('reporter').as_null_object) end end RSpec.configure do |c| c.color_enabled = !in_editor? c.before(:each) do @real_world = RSpec.world RSpec.instance_variable_set(:@world, RSpec::Core::World.new) end c.after(:each) do RSpec.instance_variable_set(:@world, @real_world) end end
Version data entries
5 entries across 5 versions & 1 rubygems