spec/spec_helper.rb in rack-schema-0.5.0 vs spec/spec_helper.rb in rack-schema-0.6.0
- old
+ new
@@ -1,19 +1,23 @@
require 'bundler/setup'
require 'simplecov'
-SimpleCov.start
+require 'coveralls'
+SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+ Coveralls::SimpleCov::Formatter,
+ SimpleCov::Formatter::HTMLFormatter,
+]
+
+SimpleCov.start do
+ add_filter "/spec/"
+end
+
require 'rspec'
require 'rack/test'
require 'rack/schema'
-require 'pry'
-
-# `json' needs to be here because simplecov assumes that if
-# ::JSON is defined, it means we have ruby's JSON loaded; otherwise,
-# they use MultiJson. silly.
-require "oj"
require "json"
+require 'pry'
module SpecHelpers
def echo(headers, body, status = 200)
env = {
'echo.body' => MultiJson.dump(body),