aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | Stupid empty line added after merge.Kasper Timm Hansen2017-07-151-1/+0
| | | | | | | |
| | * | | | | | Bump minitest; Use double quotesKasper Timm Hansen2017-07-152-2/+2
| | | | | | | |
| | * | | | | | Merge branch 'master' into unlock-minitestKasper Timm Hansen2017-07-151037-3778/+6367
| | |\ \ \ \ \ \
| | * \ \ \ \ \ \ Merge pull request #29479 from yahonda/unlock-minitest_mysql_booleanRafael França2017-06-161-0/+7
| | |\ \ \ \ \ \ \ | | | |_|/ / / / / | | |/| | | | | | Add teardown to reset_connection at MysqlTypeLookupTest
| | | * | | | | | Add teardown to reset_connection at MysqlTypeLookupTestYasuo Honda2017-06-071-0/+7
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to address `Mysql2BooleanTest#test_column_type_without_emulated_booleans` failure
| | * | | | | | Merge pull request #29359 from y-yagi/load_schema_before_assertionMatthew Draper2017-06-061-0/+6
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Load schema before assertion
| | | * | | | | | Load schema before assertionyuuji.yaginuma2017-06-061-0/+6
| | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
| | * | | | | | Merge pull request #29341 from y-yagi/explicitly_clear_type_map_before_run_testMatthew Draper2017-06-042-10/+12
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Explicitly clear type map before run `test_only_reload_type_map_once_for_every_unknown_type`
| | | * | | | | | Explicitly clear type map before run ↵yuuji.yaginuma2017-06-032-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `test_only_reload_type_map_once_for_every_unknown_type` Currently, the following test fails. ``` bin/test -a sqlite3_mem --seed 37473 test/cases/relation_test.rb ``` This is due to reset connection in `test_respond_to_for_non_selected_element` postprocessing. This reset is added with #29332 for `test_only_reload_type_map_once_for_every_unknown_type`. Since the above test expects the type map to be empty at the time of test run, I think that it is better to empty the type map before test run.
| | * | | | | | | Reset the fixture cache after (re)loading the schemaMatthew Draper2017-06-031-0/+2
| | |/ / / / / /
| | * | | | | | Merge pull request #29332 from yahonda/unlock-minitest_unknown_type_fixRafael França2017-06-021-0/+5
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Clean up `type_map` at the end of test_respond_to_for_non_selected_element
| | | * | | | | | Clean up `type_map` at the end of test_respond_to_for_non_selected_elementYasuo Honda2017-06-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `test_only_reload_type_map_once_for_every_unknown_type` expects no one already registers unknown OID to `type_map`. However, `test_respond_to_for_non_selected_element` registers it and does not clean up it. Addresses #29331 at unlock-minitest branch
| | * | | | | | | Merge branch 'master' into unlock-minitestRafael Mendonça França2017-06-0268-338/+459
| | |\ \ \ \ \ \ \ | | | |/ / / / / / | | |/| | | | | |
| | * | | | | | | Merge pull request #29317 from alexcameron89/fix_persistence_save_testMatthew Draper2017-06-021-21/+7
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Use existing class in PersistenceTest::SaveTest
| | | * | | | | | | Use existing class in PersistenceTest::SaveTestAlex Kitchens2017-06-011-21/+7
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a new class for widgets was causing failing tests because it clashed with other widget classes. This test does not need to create its own class, so I changed it to an existing class. ``` ARCONN=mysql2 bin/test --seed 25364 test/cases/*test.rb -n \ "/^(?:PrimaryKeyIntegerTest#(?:test_primary_key_with_serial_integer_are_automatically_numbered)|PersistenceTest::SaveTest#(?:test_save_touch_false))$/" ```
| | * | | | | | | Merge pull request #29287 from alexcameron89/fix-db-statement-test-48104Matthew Draper2017-06-011-0/+1
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix random minitest error: database_statements_test
| | | * | | | | | | Reset primary key sequence in FixturesResetPkSequenceTestsAlex Kitchens2017-05-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary key sequence for each test in FixturesResetPkSequenceTest is reset. The state in some of the FixturesResetPkSequenceTest tests are leaking, causing failurse in others. Using a seed of `48104`, the `FixturesResetPkSequenceTest#test_resets_to_min_pk_with_specified_pk_and_sequence` runs before the `DatabaseStatementsTest` tests, and the tests fail with duplicate primary key errors: ``` Run options: --seed 48104 -n "/^(?:FixturesResetPkSequenceTest#(?:test_resets_to_min_pk_with_specified_pk_and_sequence)|DatabaseStatementsTest#(?:test_create_should_return_the_inserted_id|test_exec_insert|test_insert_should_return_the_inserted_id))$/" .EEE 1) Error: DatabaseStatementsTest#test_exec_insert: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "accounts_pkey" DETAIL: Key (id)=(2) already exists. 2) Error: DatabaseStatementsTest#test_create_should_return_the_inserted_id: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "accounts_pkey" DETAIL: Key (id)=(3) already exists. 3) Error: DatabaseStatementsTest#test_insert_should_return_the_inserted_id: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "accounts_pkey" DETAIL: Key (id)=(4) already exists. ```
| | * | | | | | | | Merge pull request #29298 from alexcameron89/minitest-59389Rafael França2017-05-311-0/+2
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Ensure fixtures are loaded for FoxyFixturesTest
| | | * | | | | | | | Ensure fixtures are loaded for FoxyFixturesTestAlex Kitchens2017-05-311-0/+2
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the fixtures are properly loaded for FoxyFixturesTest When tests are randomized, FoxyFixturesTest often fails due to unloaded fixtures.
| | * | | | | | | | Merge pull request #29291 from y-yagi/make_sure_to_disable_extension_after_testMatthew Draper2017-05-311-6/+2
| | |\ \ \ \ \ \ \ \ | | | |/ / / / / / / | | |/| | | | | | | Make sure to disable extension after test
| | | * | | | | | | Make sure to disable extension after testyuuji.yaginuma2017-05-311-6/+2
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If keep the extension, can not test properly to make sure that extension can be enabled.
| | * | | | | | | Merge pull request #29277 from y-yagi/reset_time_zone_to_previous_valueKasper Timm Hansen2017-05-301-1/+8
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Reset time zone to previous value
| | | * | | | | | | Reset time zone to previous valueyuuji.yaginuma2017-05-301-1/+8
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `CurrentAttributesTest` changed the global time zone, it is necessary to restore the original value after changing the test. The reproduction step: ``` ./bin/test -w --seed 5549 test/current_attributes_test.rb test/core_ext/date_ext_test.rb ```
| | * | | | | | | Merge branch 'master' into unlock-minitestKasper Timm Hansen2017-05-29421-2199/+3517
| | |\ \ \ \ \ \ \
| | * \ \ \ \ \ \ \ Merge pull request #29071 from y-yagi/fix_default_scoping_testKasper Timm Hansen2017-05-281-0/+4
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Explicitly create necessary data for test
| | | * | | | | | | | Explicitly create necessary data for testyuuji.yaginuma2017-05-131-0/+4
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `DefaultScopingWithThreadTest` expects that there are two or more of `developers` data, but have not created data in the test. Therefore, tests may fail depending on execution order.
| | * | | | | | | | Merge pull request #28954 from bogdanvlviv/set-proper-assertion-that-test-failedRafael França2017-05-021-1/+1
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Set proper assertion to be sure the test failed
| | | * | | | | | | | Set proper assertion to be sure the test failedbogdanvlviv2017-05-021-1/+1
| | |/ / / / / / / /
| | * | | | | | | | Avoid stubing on this testRafael Mendonça França2017-04-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will avoid to the test fail when running in isolation because the message generated is nil.
| | * | | | | | | | Run ReloadModelTest in a different proccessRafael Mendonça França2017-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make sure it doesn't change the state of the current proccess when removing the owners constant.
| | * | | | | | | | Only clean the connection of the current connection poolRafael Mendonça França2017-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will avoid us to close the connection of the saved connection pool.
| | * | | | | | | | New minitest 'assert false' messagePavel Valena2017-04-261-1/+1
| | | | | | | | | |
| | * | | | | | | | Don't use same table between primary_keys tests and composite_primary_keys testsPrathamesh Sonpatki2017-04-261-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The test `PrimaryKeyAnyTypeTest#test_any_type_primary_key` was failing if ran after running all tests from `CompositePrimaryKeyTest`. - This was happening because `CompositePrimaryKeyTest` was changing the primary key of the barcodes table which was cached in schema cache. - As we were always going to drop the `barcodes` table at the end of tests in both `PrimaryKeyTest` and `CompositePrimaryKeyTest`, solved this issue by using different table name for tests in `CompositePrimaryKeyTest`.
| | * | | | | | | | Fix one more test randomly failing due to array ordering issue on PG adapterPrathamesh Sonpatki2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproduction command - ARCONN=postgresql be ruby -w -Itest test/cases/autosave_association_test.rb --seed 34101
| | * | | | | | | | Fix the random failure of `test_create_resets_cached_counters`Prathamesh Sonpatki2017-04-262-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Tried specifying `id` for the `readers` records but it is interconnected with so many tests that many random tests started failing. - So switched to the approach of deleting all readers in the `create_resets_cached_counters` test.
| | * | | | | | | | Fix random test failure of test_create_resets_cached_countersPrathamesh Sonpatki2017-04-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In earlier commit, I removed setting id manually for readers fixtures but that did not fix the randomly failing test_create_resets_cached_counters from has_many_associations tests. - Because the problem was with the `person_id` of the readers. As it is set to 1 in fixtures, if a post gets created with id 1 then that post automatically has 2 readers. - Fixed by removing the person_id.
| | * | | | | | | | Don't add specific id's to the readers fixturesPrathamesh Sonpatki2017-04-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This causes failures in the `test_create_resets_cached_counters` from the has_many_associations tests because sometimes a Post record gets created with id as 1 so the readers records get associated with it and `person.readers` returns these 2 records instead of empty array. - Better to just remove the ids.
| | * | | | | | | | Add minitest-bisect as part of the gemfileRafael Mendonça França2017-04-262-1/+10
| | | | | | | | | |
| | * | | | | | | | Release minitest lock so we can fix the order dependent testsRafael Mendonça França2017-04-262-5/+1
| | | | | | | | | |
| * | | | | | | | | Merge pull request #29777 from yui-knk/set_content_typeMatthew Draper2017-08-021-3/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Refactoring `Response#charset=`
| | * | | | | | | | | Brush up local variables assignmentyui-knk2017-07-131-3/+2
| | | | | | | | | | |
| | * | | | | | | | | Use `#set_content_type` instead of `#set_header`yui-knk2017-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By this commit, `#set_header` is called only via `#set_content_type`. This commit makes the role of `#charset=` more clear.
| * | | | | | | | | | Merge pull request #29724 from eugeneius/sync_primary_keyMatthew Draper2017-08-024-5/+57
| |\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / / / | |/| | | | | | | | | Sync transaction state when accessing primary key
| | * | | | | | | | | Sync transaction state when accessing primary keyEugene Kenny2017-07-094-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a record is modified inside a transaction, it must check the outcome of that transaction before accessing any state which would no longer be valid if it was rolled back. For example, consider a new record that was saved inside a transaction which was later rolled back: it should be restored to its previous state so that saving it again inserts a new row into the database instead of trying to update a row that no longer exists. The `id` and `id=` methods defined on the PrimaryKey module implement this correctly, but when a model uses a custom primary key, the reader and writer methods for that attribute must check the transaction state too. The `read_attribute` and `write_attribute` methods also need to check the transaction state when accessing the primary key.
* | | | | | | | | | | Merge pull request #30040 from rbarysas/active-storage-importRyuta Kamizono2017-08-021-0/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add Azure to the available services list [ci skip]
| * | | | | | | | | | | Add Azure to the available services listRolandas Barysas2017-08-021-0/+1
|/ / / / / / / / / / /
* | | | | | | | | | | Merge pull request #30035 from ytbryan/patch-1Ryuta Kamizono2017-08-021-3/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add Azure to readme [ci skip]
| * | | | | | | | | | | Add Azure to readme Bryan Lim2017-08-021-3/+1
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | previously https://github.com/rails/activestorage/pull/86
* | | | | | | | | | | Skip if credentials aren't providedDavid Heinemeier Hansson2017-08-012-2/+2
| | | | | | | | | | |
* | | | | | | | | | | Fix dummy app for inclusion in RailsDavid Heinemeier Hansson2017-08-011-2/+1
| | | | | | | | | | |