Sha256: cf2c444793793fb30bc08a73002867c1691c0b64cb54aa1a611fc7604c32054c

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

#$:.unshift File.expand_path('..', __FILE__)
$:.unshift File.expand_path('../../lib', __FILE__)

require 'daemonizer'
require 'fileutils'
require 'rubygems'
require 'rspec'
require 'open3'

Dir["#{File.expand_path('support', File.dirname(__FILE__))}/*.rb"].each do |file|
  require file
end

$debug    = false
$show_err = true

FileUtils.rm_rf(Spec::Path.app_root)

RSpec.configure do |config|
  config.include Spec::Helpers
  config.include Spec::Path
  config.include Spec::DaemonfileFactory
  config.include Spec::Processes

  config.filter_run :focused => true
  config.run_all_when_everything_filtered = true
  config.alias_example_to :fit, :focused => true

  config.mock_with :mocha

  original_wd = Dir.pwd

  config.before :each do
    reset!
    in_app_root
  end

  config.after :each do
    Dir.chdir(original_wd)
  end
end

class SpecHandler < Daemonizer::Handler
  def initialize(*args)
    @worker_id = 1
    @workers_count = 1
    super
  end

  def prepare(starter, &block)
    super
  end

  def start
    self
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
daemonizer-0.5.0.beta.1 spec/spec_helper.rb