Sha256: 9454888cc87f3fb8da38229b6f61b70c22bc0db6dff237c0f6ea324b5e5b703d
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
require 'logger' require 'em-http' require 'em-websocket-client' 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 config.before(:each) do # For now, this resets the AMQP configuration between runs. Firehose.reset! end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
firehose-0.0.16 | spec/spec_helper.rb |