spec/spec_helper.rb in virtus-1.0.3 vs spec/spec_helper.rb in virtus-1.0.4
- old
+ new
@@ -1,24 +1,11 @@
-if ENV['COVERAGE'] == 'true'
- require 'simplecov'
- require 'coveralls'
-
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
- SimpleCov::Formatter::HTMLFormatter,
- Coveralls::SimpleCov::Formatter
- ]
-
- SimpleCov.start do
- command_name 'spec:unit'
- add_filter 'config/'
- add_filter 'spec'
- add_filter '.bundle'
- end
+if RUBY_ENGINE == "rbx"
+ require "codeclimate-test-reporter"
+ CodeClimate::TestReporter.start
end
require 'rspec'
-require 'rspec/its'
require 'bogus/rspec'
require 'virtus'
require 'inflecto' # for resolving namespaced constant names
module Virtus
@@ -31,11 +18,10 @@
# require spec support files and shared behavior
Dir[File.expand_path('../shared/**/*.rb', __FILE__)].each { |file| require file }
RSpec.configure do |config|
-
# Remove anonymous- and example- Attribute classes from Attribute descendants
config.after :all do
stack = [ Virtus::Attribute ]
while klass = stack.pop
klass.descendants.delete_if do |descendant|
@@ -51,7 +37,6 @@
Examples.constants.each do |const_name|
ConstantsHelpers.undef_constant(Examples, const_name)
end
end
end
-
end