spec/spec_helper.rb in enceladus-0.0.3 vs spec/spec_helper.rb in enceladus-0.0.4

- old
+ new

@@ -1,22 +1,31 @@ require "codeclimate-test-reporter" -CodeClimate::TestReporter.start do +SimpleCov.start do + formatter SimpleCov::Formatter::MultiFormatter[SimpleCov::Formatter::HTMLFormatter,CodeClimate::TestReporter::Formatter] add_filter "/support/responses" end require 'rspec' require 'json' require 'webmock/rspec' require 'byebug' require 'enceladus' +require 'factory_girl' +require 'faker' +require File.dirname(__FILE__) + "/support/api_resource" -Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |file| require file } +RSpec.configure do |config| + config.mock_with :rspec -RSpec.configure do |c| - c.mock_with :rspec + config.include FactoryGirl::Syntax::Methods + FactoryGirl.find_definitions WebMock.disable_net_connect!(allow: "codeclimate.com") - c.before do + config.before do |example| Enceladus::Configuration::Api.instance.send(:api_key=, "token") + + unless example.metadata[:logger_test] + Enceladus::Logger.logger_output = nil + end end end