Sha256: 1e96ffbdd15826818d4d12c42b7f11dddb944baf2304dfbeead11ecd3036e3f5

Contents?: true

Size: 1.36 KB

Versions: 14

Compression:

Stored size: 1.36 KB

Contents

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb",  __FILE__)

# we insist on minitest, when only the best will do. 
# Rails will build on top of it if it's there. 
require 'minitest/unit'

require "rails/test_help"

Rails.backtrace_cleaner.remove_silencers!

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

# Load fixtures from the engine
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
end

# VCR is used to 'record' HTTP interactions with
# third party services used in tests, and play em
# back. Useful for efficiency, also useful for
# testing code against API's that not everyone
# has access to -- the responses can be cached
# and re-used. 
require 'vcr'
require 'webmock'

# To allow us to do real HTTP requests in a VCR.turned_off, we
# have to tell webmock to let us. 
WebMock.allow_net_connect!

VCR.configure do |c|
  c.cassette_library_dir = 'test/vcr_cassettes'
  # webmock needed for HTTPClient testing
  c.hook_into :webmock 
end

# Silly way to not have to rewrite all our tests if we
# temporarily disable VCR, make VCR.use_cassette a no-op
# instead of no-such-method. 
if ! defined? VCR
  module VCR
    def self.use_cassette(*args)
      yield
    end
  end
end


Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bento_search-1.2.0 test/test_helper.rb
bento_search-1.1.0 test/test_helper.rb
bento_search-1.0.6 test/test_helper.rb
bento_search-1.0.4 test/test_helper.rb
bento_search-1.0.3 test/test_helper.rb
bento_search-1.0.2 test/test_helper.rb
bento_search-1.0.1 test/test_helper.rb
bento_search-1.0.0 test/test_helper.rb
bento_search-0.9.0 test/test_helper.rb
bento_search-0.8.0 test/test_helper.rb
bento_search-0.7.0 test/test_helper.rb
bento_search-0.6.0 test/test_helper.rb
bento_search-0.5.0 test/test_helper.rb
bento_search-0.0.1 test/test_helper.rb