diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-24 17:21:17 +0000 |
commit | 9887f238871bb2dd73de6ce8855615bcc5d8d079 (patch) | |
tree | 74fa9ff9524a51701cfa23f708b3f777c65b7fe5 /railties/test/script_rails_loader_test.rb | |
parent | aff821508a16245ebc03510ba29c70379718dfb7 (diff) | |
parent | 5214e73850916de3c9127d35a4ecee0424d364a3 (diff) | |
download | rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.gz rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.tar.bz2 rails-9887f238871bb2dd73de6ce8855615bcc5d8d079.zip |
Merge branch 'master' of https://github.com/rails/rails
Diffstat (limited to 'railties/test/script_rails_loader_test.rb')
-rw-r--r-- | railties/test/script_rails_loader_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/test/script_rails_loader_test.rb b/railties/test/script_rails_loader_test.rb index 2a87e5cb58..3ccc147749 100644 --- a/railties/test/script_rails_loader_test.rb +++ b/railties/test/script_rails_loader_test.rb @@ -2,21 +2,21 @@ require 'abstract_unit' require 'rails/script_rails_loader' class ScriptRailsLoaderTest < ActiveSupport::TestCase - + test "is in a rails application if script/rails exists" do File.stubs(:exists?).returns(true) assert Rails::ScriptRailsLoader.in_rails_application? end - + test "is in a rails application if parent directory has script/rails" do File.stubs(:exists?).with("/foo/bar/script/rails").returns(false) File.stubs(:exists?).with("/foo/script/rails").returns(true) assert Rails::ScriptRailsLoader.in_rails_application_subdirectory?(Pathname.new("/foo/bar")) end - + test "is not in a rails application if at the root directory and doesn't have script/rails" do Pathname.any_instance.stubs(:root?).returns true assert !Rails::ScriptRailsLoader.in_rails_application? end - + end
\ No newline at end of file |