Skip to content

allow users to use fixture_path and transactional_fixtures settings #1381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

swaroopmurthy
Copy link

We have a project where we're using
config.fixture_path
config.use_transactional_fixtures

Why was this removed?

@cupakromer
Copy link
Member

Was this meant to be added to rspec/rspec-rails? Those configuration options have not been removed. They are set in rspec/rails/configuration.rb.

@swaroopmurthy
Copy link
Author

Apologies, we must be doing it in the wrong order. I'm getting this error:
uninitialized constant RSpec::Rails::ControllerExampleGroup

from the following sequence:
require 'rspec/rails/extensions/active_record/proxy'
require 'rspec/rails/adapters'
require 'rspec/rails/configuration'
require 'rspec/rails/fixture_support'

@cupakromer
Copy link
Member

You should just be using require 'rspec/rails' after loading your Rails configuration. The default generated spec/rails_helper.rb starts with:

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
# Prevent database truncation if the environment is production
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper'
require 'rspec/rails'

It is not intended to piecewise load rspec-rails.

@cupakromer
Copy link
Member

Is this by any chance the issue reported in #1355 fixed in #1372?

@cupakromer
Copy link
Member

@swaroopmurthy please let us know if you're still seeing this issue. If so please make sure you've updated to the lasted to get the prior mentioned fix. Cheers!

@cupakromer cupakromer closed this Aug 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants