Sha256: 1b90994da19f27a231f5b94e12df058b3cc9037208e75e28ea314773f80a78f1

Contents?: true

Size: 1.91 KB

Versions: 16

Compression:

Stored size: 1.91 KB

Contents

# -*- encoding : utf-8 -*-
# This file is copied to spec/ when you run 'rails generate rspec:install'
# Has been customized by Blacklight to work when application is in one place,
# and actual spec/ stuff is in another (the blacklight gem checkout).  

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

ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.9/ and ruby_engine != "jruby"
  require 'simplecov'
  require 'simplecov-rcov'

  SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
  SimpleCov.start do
    root File.expand_path(File.dirname(__FILE__) + "../../..")
  end
end

#require File.expand_path("../../config/environment", __FILE__)
# version that works with our blacklight:spec stuff that calls specs
# in a remote directory. 
require File.expand_path("config/environment", ENV['RAILS_ROOT'] || File.expand_path("../..", __FILE__))
require 'rspec/rails'
require 'capybara/rspec'

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
# Blacklight, again, make sure we're looking in the right place for em. 
# Relative to HERE, NOT to Rails.root, which is off somewhere else. 
#Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
Dir[Pathname.new(File.expand_path("../support/**/*.rb", __FILE__))].each {|f| require f}


RSpec.configure do |config|
  # == Mock Framework
  #
  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
  #
  # config.mock_with :mocha
  # config.mock_with :flexmock
  # config.mock_with :rr
  config.mock_with :rspec

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

  # If you're not using ActiveRecord, or you'd prefer not to run each of your
  # examples within a transaction, remove the following line or assign false
  # instead of true.
  config.use_transactional_fixtures = true
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
blacklight-4.1.0 test_support/spec/spec_helper.rb
blacklight-4.0.1 test_support/spec/spec_helper.rb
blacklight-3.8.2 test_support/spec/spec_helper.rb
blacklight-4.0.0 test_support/spec/spec_helper.rb
blacklight-4.0.0.rc2 test_support/spec/spec_helper.rb
blacklight-4.0.0.rc1 test_support/spec/spec_helper.rb
blacklight-4.0.0.pre7 test_support/spec/spec_helper.rb
blacklight-4.0.0.pre6 test_support/spec/spec_helper.rb
blacklight-3.8.1 test_support/spec/spec_helper.rb
blacklight-3.8.0 test_support/spec/spec_helper.rb
blacklight-3.7.2 test_support/spec/spec_helper.rb
blacklight-3.7.1 test_support/spec/spec_helper.rb
blacklight-3.7.0 test_support/spec/spec_helper.rb
blacklight-3.6.1.1 test_support/spec/spec_helper.rb
blacklight-3.6.0 test_support/spec/spec_helper.rb
blacklight-3.5.0 test_support/spec/spec_helper.rb