Reputation: 16627
Can't I use transactional fixtures in gem (not Rails) development?
I added this to my spec_helper.rb:
RSpec.configure do |config| config.filter_run :focus => true config.run_all_when_everything_filtered = true config.filter_run_excluding :exclude => true config.mock_with :rspec config.use_transactional_fixtures = true end
But I get:
undefined method `use_transactional_fixtures=' for #<RSpec::Core::Configuration:0xb7313ca8> (NoMethodError)
Do I really have to take care of the database cleanup myself (maybe with another plugin), or could I simply "require" something to make transactional fixtures work?
Here are my current requires:
require 'rubygems' require 'bundler' require 'logger' require 'active_record' require 'rspec' require 'active_support'
Upvotes: 2
Views: 1453
Reputation: 176472
use_transactional_fixtures
RSpec support is defined in rspec-rails
. You need to include that Gem or reproduce its functionalities in order to use it.
Upvotes: 4