Skip to content

Commit

Permalink
Adding a fix for error reported on rails #1557
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Dec 11, 2008
1 parent 1d4f857 commit 67a831e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -54,7 +54,7 @@ task "SPECDOC" => "spec:doc"
desc "Generate rdoc for #{plugin_name}"
Rake::RDocTask.new(:doc) do |t|
t.rdoc_dir = 'doc'
t.main = 'README'
t.main = 'README.rdoc'
t.title = "#{plugin_name}"
t.template = ENV['RDOC_TEMPLATE']
t.options = ['--line-numbers', '--inline-source', '--all']
Expand Down
26 changes: 10 additions & 16 deletions spec/spec_helper.rb
@@ -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

0 comments on commit 67a831e

Please sign in to comment.