diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-07-02 12:14:16 +0530 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2013-07-02 12:14:16 +0530 |
commit | 1a560e6160f8b4f4a6c01d13000bad20ef02edf9 (patch) | |
tree | 932392e1027d2979c0dace88937d5bf9f656f9db /activerecord | |
parent | 20b3704524d5f57b4ad51c6278519ad65a7a7e64 (diff) | |
download | rails-1a560e6160f8b4f4a6c01d13000bad20ef02edf9.tar.gz rails-1a560e6160f8b4f4a6c01d13000bad20ef02edf9.tar.bz2 rails-1a560e6160f8b4f4a6c01d13000bad20ef02edf9.zip |
Removing not useful test related to reflect_on_all_associations
The comment in the test pretty much summarizes the issue.
`FIXME these assertions bust a lot`
Adding any type of association in class `Firm` will break this test.
I removed some deprecated stuff and this test failed.
I do not think this test provides any useful value. First of all who
counted last that 39 is the right number of associations.
Secondly there are a large number of tests which depend on reflection
returning right information about associations. Those tests will start
failing if there is a bug in the code.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/reflection_test.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb index b5314bc9be..4fc738da94 100644 --- a/activerecord/test/cases/reflection_test.rb +++ b/activerecord/test/cases/reflection_test.rb @@ -186,14 +186,6 @@ class ReflectionTest < ActiveRecord::TestCase ActiveRecord::Base.store_full_sti_class = true end - def test_reflection_of_all_associations - # FIXME these assertions bust a lot - assert_equal 39, Firm.reflect_on_all_associations.size - assert_equal 29, Firm.reflect_on_all_associations(:has_many).size - assert_equal 10, Firm.reflect_on_all_associations(:has_one).size - assert_equal 0, Firm.reflect_on_all_associations(:belongs_to).size - end - def test_reflection_should_not_raise_error_when_compared_to_other_object assert_nothing_raised { Firm.reflections[:clients] == Object.new } end |