diff options
author | Kir Shatrov <shatrov@me.com> | 2016-12-15 15:19:34 -0500 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2016-12-15 17:07:58 -0500 |
commit | 3e018eca32dd5bedaefe03845f076849a6fc5e4b (patch) | |
tree | c335c7ff19da69b60a5ae6650f11e787f98deed0 /activerecord/test/fixtures | |
parent | 753da21322a2701f8b2294da1c26df8a783436d5 (diff) | |
download | rails-3e018eca32dd5bedaefe03845f076849a6fc5e4b.tar.gz rails-3e018eca32dd5bedaefe03845f076849a6fc5e4b.tar.bz2 rails-3e018eca32dd5bedaefe03845f076849a6fc5e4b.zip |
Throw friendly error message when fixture is not a hash
Right now, when fixture is not a Hash we throw an error message
saying "fixture is not a hash". This is not very user friendly because
it's not saying which fixture is invalid.
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r-- | activerecord/test/fixtures/naked/yml/courses_with_invalid_key.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/naked/yml/courses_with_invalid_key.yml b/activerecord/test/fixtures/naked/yml/courses_with_invalid_key.yml new file mode 100644 index 0000000000..6f9da79b45 --- /dev/null +++ b/activerecord/test/fixtures/naked/yml/courses_with_invalid_key.yml @@ -0,0 +1,3 @@ +one: + id: 1 +two: ['not a hash'] |