spec/spec_helper.rb in rom-yesql-0.3.0 vs spec/spec_helper.rb in rom-yesql-0.4.0
- old
+ new
@@ -1,18 +1,16 @@
-# encoding: utf-8
-
require 'bundler'
Bundler.setup
-if RUBY_ENGINE == 'rbx'
- require "codeclimate-test-reporter"
- CodeClimate::TestReporter.start
+if RUBY_ENGINE == 'ruby' && ENV['CI'] == 'true'
+ require 'simplecov'
+ SimpleCov.start do
+ add_filter '/spec/'
+ end
end
require 'rom-yesql'
-# FIXME: why do we need to require it manually??
-require 'sequel/adapters/sqlite' unless RUBY_ENGINE == 'jruby'
require 'inflecto'
require 'logger'
begin
require 'byebug'
@@ -25,13 +23,15 @@
Dir[root.join('shared/*.rb').to_s].each { |f| require f }
RSpec.configure do |config|
config.before do
- @constants = Object.constants
+ module Test
+ end
end
config.after do
- added_constants = Object.constants - @constants
- added_constants.each { |name| Object.send(:remove_const, name) }
+ Object.send(:remove_const, :Test)
end
+
+ config.disable_monkey_patching!
end