Sha256: e78cfb9e0408b2449a45e2a90ebcbddb55c269efe5833cdd4b772bede8310db1
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
require 'logger' require 'em-http' require 'em-websocket-client' # Skip logging if VERBOSE isn't set to true. require 'firehose' Firehose.logger = Logger.new('/dev/null') unless ENV['VERBOSE'] # Lets skip the verbosity of the thin for the test output. require 'thin' Thin::Logging.silent = true unless ENV['VERBOSE'] # We use both EM::Http and Net::Http in this test lib. When EM:Http is fired up # we're usually hitting thins for integrations, and when Net::Http we want to mock that up. require 'webmock/rspec' WebMock.allow_net_connect! module EM::TestHelper # Run test inside of reactor. def em(ttl=30, &block) if block # Run the block inside of a reactor EM.run do EM.add_timer(ttl) do EM.stop raise "Test timed-out" end block.call(EM) end else # or just grab em and go nuts. EM end end end # Configure RSpec runner. See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config.filter_run :focus end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
firehose-0.1.1 | spec/spec_helper.rb |
firehose-0.1.0 | spec/spec_helper.rb |