Sha256: a1791ae45f0003192ba24e55a3129e81ebc960eb5b69e266092de290adf054c1

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../lib/sidekiq/cobweb_helper')
require File.expand_path(File.dirname(__FILE__) + '/../lib/cobweb')
require File.expand_path(File.dirname(__FILE__) + '/../spec/samples/sample_server')
require File.expand_path(File.dirname(__FILE__) + '/../spec/http_stubs')
require 'mock_redis'
require 'thin' if ENV["TRAVIS_RUBY_VERSION"].nil?
require 'sidekiq'

require 'coveralls'
Coveralls.wear!

# Sets up the environment as test so that exceptions are raised
ENVIRONMENT = "test"
APP_ROOT = File.expand_path(File.dirname(__FILE__) + '/../')

RSpec.configure do |config|
  
  if ENV["TRAVIS_RUBY_VERSION"] || ENV['CI']
    config.filter_run_excluding :local_only => true
  end

  Thread.new do
    @thin ||= Thin::Server.start("0.0.0.0", 3532, SampleServer.app)
  end

  # WAIT FOR START TO COMPLETE
  sleep 1

  
  config.before(:all) {
    # START THIN SERVER TO HOST THE SAMPLE SITE FOR CRAWLING
  }
  
  config.before(:each) {
        
    #redis_mock = double("redis")
    #redis_mock.stub(:new).and_return(@redis_mock_object)
    
    #redis_mock.flushdb
    
  }

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cobweb-1.0.17 spec/spec_helper.rb
cobweb-1.0.16 spec/spec_helper.rb
cobweb-1.0.15 spec/spec_helper.rb
cobweb-1.0.12 spec/spec_helper.rb