Sha256: 2f8d390767eba5679e937f75083a2d8ad64f919abd2e8885a2c7761fbc19e3fb

Contents?: true

Size: 1.42 KB

Versions: 30

Compression:

Stored size: 1.42 KB

Contents

require 'rubygems'
require 'httpclient'
unless RUBY_PLATFORM =~ /java/
  require 'curb'
  require 'patron'
  require 'em-http'
  require 'typhoeus'
end

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'rspec'

require 'webmock/rspec'

require 'support/network_connection'
require 'support/webmock_server'
require 'support/my_rack_app'

CURL_EXAMPLE_OUTPUT_PATH = File.expand_path(File.dirname(__FILE__)) + "/support/example_curl_output.txt" unless defined? CURL_EXAMPLE_OUTPUT_PATH

RSpec.configure do |config|
  unless NetworkConnection.is_network_available?
    warn("No network connectivity. Only examples which do not make real network connections will run.")
    no_network_connection = true
  end
  if ENV["NO_CONNECTION"] || no_network_connection
    config.filter_run_excluding :net_connect => true
  end

  config.filter_run_excluding :without_webmock => true

  config.before(:suite) do
    WebMockServer.instance.start unless WebMockServer.instance.started
  end

  config.after(:suite) do
    WebMockServer.instance.stop
  end

  config.filter_run :focus => true
  config.run_all_when_everything_filtered = true
end

def fail()
  raise_error(RSpec::Expectations::ExpectationNotMetError)
end

def fail_with(message)
  raise_error(RSpec::Expectations::ExpectationNotMetError, message)
end

class Proc
  def should_pass
    lambda { self.call }.should_not raise_error
  end
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/webmock-1.8.11/spec/spec_helper.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/webmock-1.8.11/spec/spec_helper.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/webmock-1.8.11/spec/spec_helper.rb
webmock-1.13.0 spec/spec_helper.rb
webmock-1.12.3 spec/spec_helper.rb
webmock-1.12.2 spec/spec_helper.rb
webmock-1.12.1 spec/spec_helper.rb
webmock-1.12.0 spec/spec_helper.rb
webmock-1.11.0 spec/spec_helper.rb
webmock-1.10.2 spec/spec_helper.rb
webmock-1.10.1 spec/spec_helper.rb
webmock-1.10.0 spec/spec_helper.rb
webmock-1.9.3 spec/spec_helper.rb
webmock-1.9.2 spec/spec_helper.rb
webmock-1.9.1 spec/spec_helper.rb
simple-client-0.0.3 vendor/bundle/ruby/1.9.1/gems/webmock-1.8.8/spec/spec_helper.rb
webmock-1.9.0 spec/spec_helper.rb
webmock-1.8.11 spec/spec_helper.rb
webmock-1.8.10 spec/spec_helper.rb
webmock-1.8.9 spec/spec_helper.rb