aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2009-10-08 18:12:28 -0700
committerCarl Lerche <carllerche@mac.com>2009-10-14 11:47:37 -0700
commitff8be66f249d49e82c8e1d04cb8cfbbc128deabe (patch)
tree6063bd4d1ff6353eb4cb6ef516c65ee5ce22b283 /railties/test
parent5ffb877d3a5d7fd2266b58495de435dd9c33d4e1 (diff)
downloadrails-ff8be66f249d49e82c8e1d04cb8cfbbc128deabe.tar.gz
rails-ff8be66f249d49e82c8e1d04cb8cfbbc128deabe.tar.bz2
rails-ff8be66f249d49e82c8e1d04cb8cfbbc128deabe.zip
Finish porting over the initializers to the app object and fix all the tests
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/configuration_test.rb17
-rw-r--r--railties/test/application/generators_test.rb2
-rw-r--r--railties/test/generators/generators_test_helper.rb9
3 files changed, 25 insertions, 3 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
new file mode 100644
index 0000000000..1bf59c2b8e
--- /dev/null
+++ b/railties/test/application/configuration_test.rb
@@ -0,0 +1,17 @@
+require "isolation/abstract_unit"
+
+module ApplicationTests
+ class InitializerTest < Test::Unit::TestCase
+ include ActiveSupport::Testing::Isolation
+
+ def setup
+ build_app
+ boot_rails
+ end
+
+ test "the application root is set correctly" do
+ # require "#{app_path}/config/environment"
+ # assert_equal app_path, Rails.application.root
+ end
+ end
+end \ No newline at end of file
diff --git a/railties/test/application/generators_test.rb b/railties/test/application/generators_test.rb
index 0d6eb4147a..0edb29483d 100644
--- a/railties/test/application/generators_test.rb
+++ b/railties/test/application/generators_test.rb
@@ -5,9 +5,9 @@ module ApplicationTests
include ActiveSupport::Testing::Isolation
def setup
- require "rails/generators"
build_app
boot_rails
+ require "rails/generators"
end
test "generators default values" do
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb
index d917812383..7599bda8a2 100644
--- a/railties/test/generators/generators_test_helper.rb
+++ b/railties/test/generators/generators_test_helper.rb
@@ -8,12 +8,17 @@ else
RAILS_ROOT = fixtures
end
+$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../activemodel/lib"
+$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../activerecord/lib"
+$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../actionpack/lib"
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib"
+# TODO: Fix this RAILS_ENV stuff
+RAILS_ENV = 'test'
+require "rails/core"
require 'rails/generators'
require 'rubygems'
-$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../activerecord/lib"
-$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../../actionpack/lib"
+
require 'active_record'
require 'action_dispatch'