Sha256: 85906d937ff273786982375fea4cbfdd0ee8322e9e2d2bf35760dc4825eefc7b

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 KB

Contents

require "bundler/setup"

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH << File.expand_path("../support", __FILE__)

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
ENV["RAILS_ENV"] ||= "test"

# Ensure the Active Admin load path is happy
require "rails"
require "enja"

ENV["RAILS"] = Rails.version
ENV["RAILS_ROOT"] = File.expand_path("../rails/rails-#{ENV['RAILS']}", __FILE__)

# Create the test app if it doesn't exists
unless File.exist?(ENV["RAILS_ROOT"])
  system "rails new spec/rails/rails-#{Rails::VERSION::STRING} -m spec/support/rails_template.rb -T -B --skip-spring --skip-sprockets"
end

# load test app
require ENV["RAILS_ROOT"] + "/config/environment.rb"

require "rspec/rails"

RSpec.configure do |config|
  config.expect_with :rspec do |expectations|
    expectations.syntax = [:should, :expect]
  end

  config.mock_with :rspec do |mocks|
    mocks.syntax = [:should, :expect]
  end

  config.order = :random

  config.use_transactional_fixtures = true
end

Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :rspec
    with.library :rails
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enja-0.1.2 spec/spec_helper.rb
enja-0.1.1 spec/spec_helper.rb
enja-0.1.0 spec/spec_helper.rb