diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-18 10:53:43 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-18 10:53:43 -0500 |
commit | 01e04a446c801af88a1bb0315efffc775a00eedf (patch) | |
tree | 4f1cbb75fe88a06572e96c269342153167af61ab /railties/test/generators_test.rb | |
parent | f74e04c21d9930c863ef92639050c0434be8dd0c (diff) | |
download | rails-01e04a446c801af88a1bb0315efffc775a00eedf.tar.gz rails-01e04a446c801af88a1bb0315efffc775a00eedf.tar.bz2 rails-01e04a446c801af88a1bb0315efffc775a00eedf.zip |
Use Rails.root in railties tests
Diffstat (limited to 'railties/test/generators_test.rb')
-rw-r--r-- | railties/test/generators_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index 2e19169d3d..178b5ef6de 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -80,7 +80,7 @@ class GeneratorsTest < GeneratorsTestCase Rails::Generators.instance_variable_set(:@load_paths, nil) spec = Gem::Specification.new - spec.expects(:full_gem_path).returns(File.join(RAILS_ROOT, 'vendor', 'another_gem_path', 'xspec')) + spec.expects(:full_gem_path).returns(File.join(Rails.root, 'vendor', 'another_gem_path', 'xspec')) Gem.expects(:respond_to?).with(:loaded_specs).returns(true) Gem.expects(:loaded_specs).returns(:spec => spec) @@ -119,7 +119,7 @@ class GeneratorsTest < GeneratorsTestCase end def test_rails_root_templates - template = File.join(RAILS_ROOT, "lib", "templates", "active_record", "model", "model.rb") + template = File.join(Rails.root, "lib", "templates", "active_record", "model", "model.rb") # Create template mkdir_p(File.dirname(template)) @@ -171,6 +171,6 @@ class GeneratorsTest < GeneratorsTestCase def test_source_paths_for_not_namespaced_generators mspec = Rails::Generators.find_by_namespace :mspec - assert mspec.source_paths.include?(File.join(RAILS_ROOT, "lib", "templates", "mspec")) + assert mspec.source_paths.include?(File.join(Rails.root, "lib", "templates", "mspec")) end end |