diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2010-06-02 16:18:03 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-06-02 16:18:03 -0500 |
commit | 942fe6514cc0db10c04fd2b46f8e1537beabef71 (patch) | |
tree | 8b9d057a91861756260aea7990308975305ab475 /railties/test/application/initializers/load_path_test.rb | |
parent | 02512914ae547eb664a78c0f6084b121d5283a61 (diff) | |
parent | ffe001f19dbbd9e697f6300650779f5e1391ce1e (diff) | |
download | rails-942fe6514cc0db10c04fd2b46f8e1537beabef71.tar.gz rails-942fe6514cc0db10c04fd2b46f8e1537beabef71.tar.bz2 rails-942fe6514cc0db10c04fd2b46f8e1537beabef71.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'railties/test/application/initializers/load_path_test.rb')
-rw-r--r-- | railties/test/application/initializers/load_path_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/test/application/initializers/load_path_test.rb b/railties/test/application/initializers/load_path_test.rb index b39b9ecaae..d31915e129 100644 --- a/railties/test/application/initializers/load_path_test.rb +++ b/railties/test/application/initializers/load_path_test.rb @@ -19,6 +19,23 @@ module ApplicationTests assert $:.include?("#{app_path}/app/models") end + test "initializing an application adds lib path on inheritance hook" do + app_file "lib/foo.rb", <<-RUBY + module Foo; end + RUBY + + add_to_config <<-RUBY + require "foo" + raise "Expected Foo to be defined" unless defined?(Foo) + RUBY + + assert_nothing_raised do + require "#{app_path}/config/environment" + end + + assert $:.include?("#{app_path}/lib") + end + test "initializing an application eager load any path under app" do app_file "app/anything/foo.rb", <<-RUBY module Foo; end |