mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
945aa87466
This commit addresses CI failure of Active Record isolation tests. https://buildkite.com/rails/rails/builds/79936 Follow up #41392 * Steps to reproduce ```ruby $ cd activerecord $ bin/test test/cases/associations/belongs_to_associations_test.rb test/cases/associations/has_many_associations_test.rb test/cases/associations/has_many_through_disable_joins_associations_test.rb test/cases/associations/has_one_associations_test.rb test/cases/connection_adapters/schema_cache_test.rb test/cases/inheritance_test.rb test/cases/migration_test.rb test/cases/store_test.rb test/cases/strict_loading_test.rb ``` Since the entire output is too long, here is the minimum case fixed by this commit. ```ruby $ cd activerecord $ bin/test test/cases/associations/belongs_to_associations_test.rb:38 Using sqlite3 Run options: --seed 34180 E Error: BelongsToAssociationsTest#test_belongs_to: NameError: Rails couldn't find a valid model for Club association. Please provide the :class_name option on the association declaration. If :class_name is already provided, make sure it's an ActiveRecord::Base subclass. /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/reflection.rb:431:in `rescue in compute_class' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/reflection.rb:422:in `compute_class' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/reflection.rb:372:in `klass' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/reflection.rb:722:in `association_primary_key' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/reflection.rb:727:in `join_primary_key' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_row.rb:150:in `block in resolve_sti_reflections' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_row.rb:138:in `each_value' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_row.rb:138:in `resolve_sti_reflections' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_row.rb:92:in `fill_row_model_attributes' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_row.rb:70:in `initialize' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_rows.rb:36:in `new' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_rows.rb:36:in `block in build_table_rows_from' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_rows.rb:35:in `each' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_rows.rb:35:in `map' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_rows.rb:35:in `build_table_rows_from' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixture_set/table_rows.rb:18:in `initialize' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:692:in `new' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:692:in `table_rows' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:633:in `block (2 levels) in insert' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:632:in `each' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:632:in `block in insert' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:629:in `each' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:629:in `insert' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:615:in `read_and_insert' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/fixtures.rb:567:in `create_fixtures' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/test_fixtures.rb:268:in `load_fixtures' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/test_fixtures.rb:122:in `setup_fixtures' /home/yahonda/src/github.com/rails/rails/activerecord/lib/active_record/test_fixtures.rb:10:in `before_setup' bin/test test/cases/associations/belongs_to_associations_test.rb:38 Finished in 0.083668s, 11.9520 runs/s, 0.0000 assertions/s. 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips $ ``` |
||
---|---|---|
.. | ||
belongs_to_associations_test.rb | ||
bidirectional_destroy_dependencies_test.rb | ||
callbacks_test.rb | ||
cascaded_eager_loading_test.rb | ||
eager_load_includes_full_sti_class_test.rb | ||
eager_load_nested_include_test.rb | ||
eager_singularization_test.rb | ||
eager_test.rb | ||
extension_test.rb | ||
has_and_belongs_to_many_associations_test.rb | ||
has_many_associations_test.rb | ||
has_many_through_associations_test.rb | ||
has_many_through_disable_joins_associations_test.rb | ||
has_one_associations_test.rb | ||
has_one_through_associations_test.rb | ||
has_one_through_disable_joins_associations_test.rb | ||
inner_join_association_test.rb | ||
inverse_associations_test.rb | ||
join_model_test.rb | ||
left_outer_join_association_test.rb | ||
nested_through_associations_test.rb | ||
required_test.rb |