diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-06-06 07:24:22 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-06-06 07:26:55 +0900 |
commit | c40502f9f063baf7fb07ea4203b0b277fddd95a1 (patch) | |
tree | d7c628117d96d3b7c76678ffaeddaf2a59b6d9a4 /railties/lib/rails/test_unit | |
parent | e7e9e0722aea751886aeb7e501fadf115e95897e (diff) | |
download | rails-c40502f9f063baf7fb07ea4203b0b277fddd95a1.tar.gz rails-c40502f9f063baf7fb07ea4203b0b277fddd95a1.tar.bz2 rails-c40502f9f063baf7fb07ea4203b0b277fddd95a1.zip |
Load schema before assertion
Without this, test fails because the load schema when pluck is executed.
Steps to reproduce:
```
bin/test -a postgresql -w --seed 61689 test/cases/*test.rb -n "/^(?:InheritanceComputeTypeTest#(?:test_inheritance_new_with_subclass_as_default)|CalculationsTest#(?:test_pluck_loaded_relation))$/"
# Running:
.F
Failure:
CalculationsTest#test_pluck_loaded_relation [/home/yaginuma/program/rails/master_y_yagi/rails/activerecord/test/cases/calculations_test.rb:722]:
1 instead of 0 queries were executed.
Queries:
SELECT c.relname FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname = ANY (current_schemas(false)) AND c.relname = 'companies' AND c.relkind IN ('r','v','m').
Expected: 0
Actual: 1
bin/test test/cases/calculations_test.rb:7
```
Diffstat (limited to 'railties/lib/rails/test_unit')
0 files changed, 0 insertions, 0 deletions