Package: ruby-protected-attributes / 1.1.3-2
Metadata
| Package | Version | Patches format |
|---|---|---|
| ruby-protected-attributes | 1.1.3-2 | 3.0 (quilt) |
Patch series
view the series file| Patch | File delta | Description |
|---|---|---|
| fix ramdom failures.patch | (download) |
test/attribute_sanitization_test.rb |
1 1 + 0 - 0 ! |
[patch] attribute_sanitization_test: avoid random failures
Because test/test_helper.rb sets the tests to run on random order, that
missing call to `super` will cause tests to crash with the following
exception, depending on which order the test classes get loaded.
```
ActiveRecord::RecordNotUnique: SQLite3::ConstraintException: UNIQUE
constraint failed: people.id: INSERT INTO "people" ("id", "first_name", "gender", "comments", "best_friend_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)
```
On my tests, this seems to happen more or less 6% of the time (i.e. 3
out of 50 runs). With this change, I was able to make 50 runs without a
single failure.
|
1
