diff options
Diffstat (limited to 'railties/test/application/initializer_test.rb')
-rw-r--r-- | railties/test/application/initializer_test.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/railties/test/application/initializer_test.rb b/railties/test/application/initializer_test.rb new file mode 100644 index 0000000000..9583e1606c --- /dev/null +++ b/railties/test/application/initializer_test.rb @@ -0,0 +1,33 @@ +require "isolation/abstract_unit" + +module ApplicationTests + class InitializerTest < Test::Unit::TestCase + include ActiveSupport::Testing::Isolation + + def setup + build_app + boot_rails + end + + test "initializing an application initializes rails" do + class MyApp < Rails::Application ; end + + if RUBY_VERSION < '1.9' + $KCODE = '' + MyApp.new + assert_equal 'UTF8', $KCODE + else + Encoding.default_external = Encoding::US_ASCII + MyApp.new + assert_equal Encoding::UTF_8, Encoding.default_external + end + end + + test "initializing an application adds the application paths to the load path" do + class MyApp < Rails::Application ; end + + MyApp.new + assert $:.include?("#{app_path}/app/models") + end + end +end
\ No newline at end of file |