diff options
author | José Valim <jose.valim@gmail.com> | 2010-06-19 17:51:29 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-19 17:51:44 +0200 |
commit | 312f43324159fbcd8749cd331ed7d6500a714a83 (patch) | |
tree | 750659e6006e58f2941c09ffdd3011e904c63b26 /railties/test/application/model_initialization_test.rb | |
parent | d430db9fd407fd6aee25ca13538d8988dc7ee297 (diff) | |
download | rails-312f43324159fbcd8749cd331ed7d6500a714a83.tar.gz rails-312f43324159fbcd8749cd331ed7d6500a714a83.tar.bz2 rails-312f43324159fbcd8749cd331ed7d6500a714a83.zip |
Clear DescendantsTracker on each request.
Diffstat (limited to 'railties/test/application/model_initialization_test.rb')
-rw-r--r-- | railties/test/application/model_initialization_test.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/railties/test/application/model_initialization_test.rb b/railties/test/application/model_initialization_test.rb deleted file mode 100644 index 6a22f8d8df..0000000000 --- a/railties/test/application/model_initialization_test.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'isolation/abstract_unit' - -class PostTest < Test::Unit::TestCase - include ActiveSupport::Testing::Isolation - - def setup - build_app - boot_rails - end - - def test_reload_should_reload_constants - app_file "app/models/post.rb", <<-MODEL - class Post < ActiveRecord::Base - validates_acceptance_of :title, :accept => "omg" - end - MODEL - - require "#{rails_root}/config/environment" - ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:") - ActiveRecord::Migration.verbose = false - ActiveRecord::Schema.define(:version => 1) do - create_table :posts do |t| - t.string :title - end - end - - p = Post.create(:title => 'omg') - assert_equal 1, Post.count - assert_equal 'omg', p.title - p = Post.first - assert_equal 'omg', p.title - end -end |