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

Version Path
dolly-1.1.7 test/test_helper.rb
dolly-1.1.6 test/test_helper.rb
dolly-1.1.5 test/test_helper.rb
dolly-1.1.4 test/test_helper.rb
dolly-1.1.3 test/test_helper.rb
dolly-1.1.2 test/test_helper.rb
dolly-1.1.1 test/test_helper.rb
dolly-1.1.0 test/test_helper.rb
dolly-1.0.1 test/test_helper.rb
dolly-1.0.0 test/test_helper.rb
dolly-0.9.0 test/test_helper.rb
dolly-0.8.1 test/test_helper.rb
dolly-0.8.0 test/test_helper.rb
dolly-0.7.6 test/test_helper.rb
dolly-0.7.5 test/test_helper.rb
dolly-0.7.3 test/test_helper.rb
dolly-0.7.2 test/test_helper.rb
dolly-0.7.1 test/test_helper.rb
dolly-0.7.0 test/test_helper.rb
dolly-0.6.2 test/test_helper.rb