File: spec_helper.rb

package info (click to toggle)
ruby-typhoeus 1.4.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 636 kB
  • sloc: ruby: 4,381; makefile: 6
file content (29 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))

#require "bundler"
#Bundler.setup
require "typhoeus"
require "rspec"

Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each { |f| require f }

RSpec.configure do |config|
  config.order = :rand

  config.before(:suite) do
    LocalhostServer.new(TESTSERVER.new, 3001)
  end

  config.after do
    Typhoeus::Pool.clear
    Typhoeus::Expectation.clear
    Typhoeus.before.clear
    Typhoeus.on_complete.clear
    Typhoeus.on_success.clear
    Typhoeus.on_failure.clear
    Typhoeus::Config.verbose = false
    Typhoeus::Config.block_connection = false
    Typhoeus::Config.memoize = false
  end
end