aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/pirates.yml
Commit message (Collapse)AuthorAgeFilesLines
* Fix lookup of fixtures with non-string labelPrathamesh Sonpatki2015-01-061-0/+3
| | | | | | | | | | | - Fixtures with non-string labels such as integers should be accessed using integer label as key. For eg. pirates(1) or pirates(42). - But this results in NotFound error because the label is converted into string before looking up into the fixtures hash. - After this commit, the label is converted into string only if its a symbol. - This issue was fount out while adding a test case for https://github.com/rails/rails/commit/7b910917.
* Extend fixture label replacement to allow string interpolationEric Steele2014-03-151-0/+3
| | | | | | | | | | | | | | Allows fixtures to use their $LABEL as part of a string instead of limiting use to the entire value. mark: first_name: $LABEL username: $LABEL1973 email: $LABEL@$LABELmail.com users(:mark).first_name # => mark users(:mark).username # => mark1973 users(:mark).email # => mark@markmail.com
* Quote these dates to prevent intermittent test failure. Suppose local time ↵Jon Leighton2011-08-041-2/+2
| | | | is 00:50 GMT+1. Without the quoting, the YAML parser would parse this as 00:50 UTC, into the local time of 01:50 GMT+1. Then, it would get written into the database in local time as 01:50. When it came back out the UTC date from the database and the UTC date of two weeks ago would be compared. The former would be 23:50, and the latter would be 00:50, so the two dates would differ, causing the assertion to fail. Quoting it prevents the YAML parser from getting involved.
* Revert "this fixes a brittle test in fixtures_test.rb which fails when you ↵Aaron Patterson2011-07-201-2/+2
| | | | | | are in a timezone which is ahead of UTC but UTC is in the previous day still." This reverts commit f92cefa95f44bcd550c402a7f5ba914f3bd783cc.
* this fixes a brittle test in fixtures_test.rb which fails when you are in a ↵Josh Kalderimis2011-07-201-2/+2
| | | | timezone which is ahead of UTC but UTC is in the previous day still.
* Revert "Fix failure in test_preserves_existing_fixture_data from ↵Jon Leighton2011-07-171-2/+2
| | | | | | test/cases/fixtures_test.rb when UTC and local time occur on different dates." I am pretty sure this was an incorrect fix, and it still failed in certain circumstances anyway. I am now unable to reproduce the original failure I was experiencing so will leave it for now and see if this pops up again. This reverts commit e4479b2f1bc54edf155408d51dd3236955150ce1.
* Fix failure in test_preserves_existing_fixture_data from ↵Jon Leighton2011-07-121-2/+2
| | | | test/cases/fixtures_test.rb when UTC and local time occur on different dates.
* Foxy fixtures. Adapter#disable_referential_integrity. Closes #9981.Jeremy Kemper2007-10-261-0/+9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de