Commit cab8ab2e47cc06bdb251118cd217ef6bd38b9a65
1 parent
b0d06330
Exists in
master
and in
29 other branches
Loading solr and removing useless database_cleaner requirement
Showing
1 changed file
with
3 additions
and
7 deletions
Show diff stats
features/support/env.rb
| @@ -5,6 +5,9 @@ | @@ -5,6 +5,9 @@ | ||
| 5 | # files. | 5 | # files. |
| 6 | 6 | ||
| 7 | ENV["RAILS_ENV"] ||= "cucumber" | 7 | ENV["RAILS_ENV"] ||= "cucumber" |
| 8 | +abort unless system 'rake -s solr:start' | ||
| 9 | +at_exit { system 'rake -s solr:stop' } | ||
| 10 | + | ||
| 8 | require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | 11 | require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') |
| 9 | 12 | ||
| 10 | require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support | 13 | require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support |
| @@ -48,13 +51,6 @@ ActionController::Base.allow_rescue = false | @@ -48,13 +51,6 @@ ActionController::Base.allow_rescue = false | ||
| 48 | Cucumber::Rails::World.use_transactional_fixtures = true | 51 | Cucumber::Rails::World.use_transactional_fixtures = true |
| 49 | # How to clean your database when transactions are turned off. See | 52 | # How to clean your database when transactions are turned off. See |
| 50 | # http://github.com/bmabey/database_cleaner for more info. | 53 | # http://github.com/bmabey/database_cleaner for more info. |
| 51 | -if defined?(ActiveRecord::Base) | ||
| 52 | - begin | ||
| 53 | - require 'database_cleaner' | ||
| 54 | - DatabaseCleaner.strategy = :truncation | ||
| 55 | - rescue LoadError => ignore_if_database_cleaner_not_present | ||
| 56 | - end | ||
| 57 | -end | ||
| 58 | 54 | ||
| 59 | Before do | 55 | Before do |
| 60 | Fixtures.reset_cache | 56 | Fixtures.reset_cache |