Sha256: c45bded5a4ad8d75587a4ec6330e68fc0a3f14c16067e26d0a4a20810fff7fca

Contents?: true

Size: 1.8 KB

Versions: 4

Compression:

Stored size: 1.8 KB

Contents

# frozen_string_literal: true

ENV["RAILS_ENV"] ||= "test"

require "spec_helper"
require "database_cleaner"
require "engine_cart"
EngineCart.load_application!

require "rspec/rails"
# Add additional requires below this line. Rails is not loaded until this point!

require "geoblacklight_sidecar_images"

# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
# run as spec files by default. This means that files in spec/support that end
# in _spec.rb will both be required and run as specs, causing the specs to be
# run twice. It is recommended that you do not name files matching this glob to
# end with _spec.rb. You can configure this pattern with the --pattern
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
#
# The following line is provided for convenience purposes. It has the downside
# of increasing the boot-up time by auto-requiring all files in the support
# directory. Alternatively, in the individual `*_spec.rb` files, manually
# require only the support files necessary.
#
# Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }

# require 'capybara/poltergeist'
# Capybara.javascript_driver = :poltergeist

RSpec.configure do |config|
  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
  config.fixture_path = "#{::Rails.root}/spec/fixtures"

  config.before(:suite) do
    DatabaseCleaner.clean_with :truncation
  end

  config.before do
    DatabaseCleaner.strategy = if Capybara.current_driver == :rack_test
      :transaction
    else
      :truncation
    end
    DatabaseCleaner.start
  end

  config.after do
    DatabaseCleaner.clean
  end

  config.infer_spec_type_from_file_location!
end

def main_app
  Rails.application.class.routes.url_helpers
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.9.2 spec/rails_helper.rb
geoblacklight_sidecar_images-1.0.0 spec/rails_helper.rb
geoblacklight_sidecar_images-0.9.1 spec/rails_helper.rb
geoblacklight_sidecar_images-0.9.0 spec/rails_helper.rb