Sha256: db3fd5e8299bf4eff389d275af26554998b43b37fd2637998f1d7ccc901e3a29

Contents?: true

Size: 1.94 KB

Versions: 9

Compression:

Stored size: 1.94 KB

Contents

# frozen_string_literal: true

ENV['RAILS_ENV'] ||= 'test'

require 'spec_helper'
require 'database_cleaner'
require 'coveralls'
Coveralls.wear!
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

9 entries across 9 versions & 1 rubygems

Version Path
geoblacklight_sidecar_images-0.8.1 spec/rails_helper.rb
geoblacklight_sidecar_images-0.8.0 spec/rails_helper.rb
geoblacklight_sidecar_images-0.7.0 spec/rails_helper.rb
geoblacklight_sidecar_images-0.6.5 spec/rails_helper.rb
geoblacklight_sidecar_images-0.6.4 spec/rails_helper.rb
geoblacklight_sidecar_images-0.6.2 spec/rails_helper.rb
geoblacklight_sidecar_images-0.6.1 spec/rails_helper.rb
geoblacklight_sidecar_images-0.6.0 spec/rails_helper.rb
geoblacklight_sidecar_images-0.5.1 spec/rails_helper.rb