Sha256: 03ef7a815a75686fece92f7d192604b95d0daf1c71a212f36867b95f5be6365d

Contents?: true

Size: 1.17 KB

Versions: 6

Compression:

Stored size: 1.17 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 '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
  
  THIN_INSTALLED = false
  if Gem::Specification.find_all_by_name("thin", ">=1.0.0").count >= 1
    require 'thin'
    THIN_INSTALLED = true
    Thread.new do
      @thin ||= Thin::Server.start("0.0.0.0", 3532, SampleServer.app)
    end
  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

6 entries across 6 versions & 1 rubygems

Version Path
cobweb-1.0.26 spec/spec_helper.rb
cobweb-1.0.24 spec/spec_helper.rb
cobweb-1.0.23 spec/spec_helper.rb
cobweb-1.0.22 spec/spec_helper.rb
cobweb-1.0.21 spec/spec_helper.rb
cobweb-1.0.20 spec/spec_helper.rb