1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
paper-trail-gem--paper_trail/spec/paper_trail
Edouard Chin 2b479a7f08 Support rails 6.0.0 (#1172)
* Change update_attributes to update

In Rails 6.0 update_attributes/update_attributes! is considered deprecated. Method update/update! is the replacement.

* CI: Don't use Bundler 1.16.1

- Bundler 1.16.1 has bug where dependencies can't be resolved properly
  when a gem is a release candidate or an alpha version.
  The underlying bundler issue can be found here https://github.com/bundler/bundler/issues/6449

* Disable eager_load in test env:

- In Rails 6.0, rails/rails@3b95478 made a change to eagerly define
  attribute methods of a Model when `eager_load` is enabled.
  This breaks our test suite because of the way we run migration.

  The TL;DR is that doing `People.attribute_names` will return an
  empty array instead of `[:id, time_zone, ...]`.
  You can find a failing build here https://travis-ci.org/paper-trail-gem/paper_trail/jobs/463369634

  Basically what happens is:

  1) The dummy app boot, attribute methods of each model are defined
     but since migration didn't run yet, the tables aren't even
     created resulting in a empty attribute set.
  2) Migration runs, but it's already too late.

  In this commit I disabled eager_loading in test, AFAIT there isn't
  much benefit in eager_loading the dummy app anyway.
  Also renaming the `user.rb` file to `postgres_user.rb` in order for
  rails autoloading to work correctly.
2018-12-04 16:10:35 -05:00
..
association_reify_error_behaviour Support rails 6.0.0 (#1172) 2018-12-04 16:10:35 -05:00
associations Support rails 6.0.0 (#1172) 2018-12-04 16:10:35 -05:00
attribute_serializers Lint: Style/FrozenStringLiteralComment 2017-12-10 23:05:39 -05:00
events Add optional column: item_subtype 2018-08-22 00:42:37 -04:00
serializers Lint: Style/RandomWithOffset 2018-03-27 18:30:32 -04:00
cleaner_spec.rb Lint: Style/FrozenStringLiteralComment 2017-12-10 23:05:39 -05:00
config_spec.rb Ask for help with association tracking 2018-03-24 00:26:28 -04:00
model_config_spec.rb Alphabetize methods, other code style 2018-11-12 13:05:15 -05:00
model_spec.rb Support rails 6.0.0 (#1172) 2018-12-04 16:10:35 -05:00
request_spec.rb Extract gem: paper_trail-association_tracking 2018-06-04 14:53:14 -04:00
serializer_spec.rb Extract Events module 2018-07-22 01:32:30 -04:00
version_concern_spec.rb Lint: Style/FrozenStringLiteralComment 2017-12-10 23:05:39 -05:00
version_limit_spec.rb Support rails 6.0.0 (#1172) 2018-12-04 16:10:35 -05:00
version_number_spec.rb Lint: Style/FrozenStringLiteralComment 2017-12-10 23:05:39 -05:00
version_spec.rb Support rails 6.0.0 (#1172) 2018-12-04 16:10:35 -05:00