aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorprakash <prakash@punchh.com>2015-08-18 11:39:52 +0530
committerprakash <prakash@punchh.com>2015-08-18 11:39:52 +0530
commit820726704d2b2b4ba040b7ab54f9f626b622247e (patch)
treeec58f2df583daf838099cf11e3a1fd66e5501ec0 /activerecord/test
parent88a1800526855edfc42209d4960b48550212fd8f (diff)
downloadrails-820726704d2b2b4ba040b7ab54f9f626b622247e.tar.gz
rails-820726704d2b2b4ba040b7ab54f9f626b622247e.tar.bz2
rails-820726704d2b2b4ba040b7ab54f9f626b622247e.zip
Correct error message in Standard American english and add a test case for the same.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/preloader_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/test/cases/preloader_test.rb b/activerecord/test/cases/preloader_test.rb
new file mode 100644
index 0000000000..12f4c75764
--- /dev/null
+++ b/activerecord/test/cases/preloader_test.rb
@@ -0,0 +1,13 @@
+require 'cases/helper'
+require 'models/car'
+
+class AssociationsTest < ActiveRecord::TestCase
+ fixtures :cars
+
+ def test_preload_with_exception
+ exception = assert_raises(ArgumentError) do
+ Car.preload(10).to_a
+ end
+ assert_equal('10 was not recognized for preload', exception.message)
+ end
+end