Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a fix for error reported on rails #1557
- Loading branch information
Showing
2 changed files
with
11 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
# This file is copied to ~/spec when you run 'ruby script/generate rspec' | ||
# from the project root directory. | ||
ENV["RAILS_ENV"] ||= "test" | ||
require File.expand_path(File.join(File.dirname(__FILE__), "../../../../config/environment")) | ||
|
||
# this jiggery pokery is because edge rails currently borks unless | ||
# you load config/environment from RAILS_ROOT - see #1557 | ||
require 'fileutils' | ||
include FileUtils | ||
cd File.join(File.dirname(__FILE__), "../../../..") do | ||
require "config/environment" | ||
end | ||
|
||
require 'spec' | ||
require 'spec/rails' | ||
|
||
Spec::Runner.configure do |config| | ||
config.use_transactional_fixtures = true | ||
config.use_instantiated_fixtures = false | ||
config.fixture_path = RAILS_ROOT + '/spec/fixtures' | ||
|
||
# You can declare fixtures for each behaviour like this: | ||
# describe "...." do | ||
# fixtures :table_a, :table_b | ||
# | ||
# Alternatively, if you prefer to declare them only once, you can | ||
# do so here, like so ... | ||
# | ||
# config.global_fixtures = :table_a, :table_b | ||
# | ||
# If you declare global fixtures, be aware that they will be declared | ||
# for all of your examples, even those that don't use them. | ||
end |