require 'simplecov' require 'coveralls' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start { add_filter '/spec/' } require 'timecop' require 'lita-zerocater' require 'lita/rspec' Lita.version_3_compatibility_mode = false RSpec.configure do |config| config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with :rspec do |mocks| mocks.verify_partial_doubles = true end config.filter_run :focus config.run_all_when_everything_filtered = true config.default_formatter = 'doc' if config.files_to_run.one? config.order = :random Kernel.srand config.seed end def grab_request(method, status, body) response = double('Faraday::Response', status: status, body: body) allow_any_instance_of(Faraday::Connection).to receive(method.to_sym) .and_return(response) end