1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add require "models/post" to address NameError: uninitialized constant

Follow up #44408

This commit addresses Active Record isolated CI failures. Here is one of
them.

```ruby
$ ARCONN=sqlite3 bundle exec ruby -w -Itest -Ilib -I../activesupport/lib -I../activemodel/lib test/cases/adapters/sqlite3/bind_parameter_test.rb -n test_where_with_string_for_string_column_using_bind_parameters
Using sqlite3
Run options: -n test_where_with_string_for_string_column_using_bind_parameters --seed 21170

E

Error:
ActiveRecord::ConnectionAdapters::SQLite3Adapter::BindParameterTest#test_where_with_string_for_string_column_using_bind_parameters:
NameError: uninitialized constant ActiveRecord::ConnectionAdapters::SQLite3Adapter::BindParameterTest::Post
    test/cases/adapters/sqlite3/bind_parameter_test.rb:12:in `test_where_with_string_for_string_column_using_bind_parameters'

rails test test/cases/adapters/sqlite3/bind_parameter_test.rb:11

Finished in 0.017992s, 55.5789 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
$
```

Other isolated CI failures are also addressed.

```
ARCONN=sqlite3 bundle exec ruby -w -Itest -Ilib -I../activesupport/lib -I../activemodel/lib test/cases/adapters/sqlite3/bind_parameter_test.rb
ARCONN=mysql2 bundle exec ruby -w -Itest -Ilib -I../activesupport/lib -I../activemodel/lib test/cases/adapters/mysql2/bind_parameter_test.rb
ARCONN=postgresql bundle exec ruby -w -Itest -Ilib -I../activesupport/lib -I../activemodel/lib test/cases/adapters/postgresql/bind_parameter_test.rb
```
This commit is contained in:
Yasuo Honda 2022-02-13 09:38:19 +09:00
parent f9a1671c18
commit 6019670c3f
3 changed files with 3 additions and 0 deletions

View file

@ -2,6 +2,7 @@
require "cases/helper"
require "models/topic"
require "models/post"
module ActiveRecord
module ConnectionAdapters

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true
require "cases/helper"
require "models/post"
module ActiveRecord
module ConnectionAdapters

View file

@ -1,6 +1,7 @@
# frozen_string_literal: true
require "cases/helper"
require "models/post"
module ActiveRecord
module ConnectionAdapters