Permalink
Browse files

Use Rails module in generated files [#31 state:resolved]

  • Loading branch information...
1 parent 373cd04 commit 80b47c1a965e88a599521113409c07d200bbaa3e @iain iain committed with dchelimsky Apr 17, 2010
@@ -28,7 +28,7 @@ end
Rake.application.instance_variable_get('@tasks').delete('default')
-spec_prereq = File.exist?(File.join(Rails.root, 'config', 'database.yml')) ? "db:test:prepare" : :noop
+spec_prereq = Rails.root.join('config', 'database.yml').exist? ? "db:test:prepare" : :noop
task :noop do
end
@@ -1,7 +1,7 @@
# This file is copied to ~/spec when you run 'ruby script/generate rspec'
# from the project root directory.
ENV["RAILS_ENV"] ||= 'test'
-require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)
+require File.dirname(__FILE__) + "/../config/environment" unless defined?(Rails)
require 'rspec/rails'
# Requires supporting files with custom matchers and macros, etc,

0 comments on commit 80b47c1

Please sign in to comment.