Sha256: aacbbd78f41b5a90f51b5629c34e0dd97aab6352ea5373c02b6344a6b777b593
Contents?: true
Size: 837 Bytes
Versions: 35
Compression:
Stored size: 837 Bytes
Contents
# Configure Rails Environment ENV["RAILS_ENV"] = "test" require 'fakeweb' require File.expand_path("../dummy/config/environment.rb", __FILE__) 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 class ActiveSupport::TestCase DEFAULT_DB = 'test' setup :global_setup def global_setup FakeWeb.allow_net_connect = false response = { uuids: [SecureRandom.uuid] } FakeWeb.register_uri(:get, %r|http://.*:5984/_uuids.*|, body: response.to_json) end protected def base_path %r|http://.*:5984/#{DEFAULT_DB}| end end
Version data entries
35 entries across 35 versions & 1 rubygems