Sha256: c6991e28776d0266cafe965948d3f9f3ab79997bdf5db081ab359a962a55443f
Contents?: true
Size: 746 Bytes
Versions: 2
Compression:
Stored size: 746 Bytes
Contents
ENV['FLUQ_ENV'] ||= "test" ENV['FLUQ_ROOT'] ||= File.expand_path("../scenario/", __FILE__) require 'bundler/setup' require 'rspec' require 'fluq/testing' FluQ.logger = Logger.new(FluQ.root.join("log", "fluq.log").to_s) FluQ::Testing.track_exceptions! $LOAD_PATH.unshift FluQ.root.join('lib') Random.srand(1234) module FluQ::SpecHelpers def self.included(base) super base.instance_eval do let(:reactor) { @_reactor ||= FluQ::Reactor.new } end end def with_reactor(&block) FluQ::Reactor.run do |reactor| @_reactor = reactor block.call(reactor) EM.stop end end end RSpec.configure do |c| c.include FluQ::SpecHelpers c.after do FileUtils.rm_rf FluQ.root.join("tmp").to_s end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fluq-0.7.5 | spec/spec_helper.rb |
fluq-0.7.3 | spec/spec_helper.rb |