diff options
author | rohit <rohit.arondekar@gmail.com> | 2010-09-02 15:11:58 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-02 12:59:21 +0200 |
commit | 8ffa695cecfbaf63f2ad15adcc06593df8432976 (patch) | |
tree | b4897fbe404d2440b478110ef56fdc79c283b39b | |
parent | 1503e45e2e2de8314429d3e3006bd49c0c4a11d6 (diff) | |
download | rails-8ffa695cecfbaf63f2ad15adcc06593df8432976.tar.gz rails-8ffa695cecfbaf63f2ad15adcc06593df8432976.tar.bz2 rails-8ffa695cecfbaf63f2ad15adcc06593df8432976.zip |
Failing test for GeneratedAttribute [#5461 state:open]
Signed-off-by: José Valim <jose.valim@gmail.com>
-rw-r--r-- | railties/test/generators/generated_attribute_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/generators/generated_attribute_test.rb b/railties/test/generators/generated_attribute_test.rb index de7e4de2a6..272e179fe3 100644 --- a/railties/test/generators/generated_attribute_test.rb +++ b/railties/test/generators/generated_attribute_test.rb @@ -108,4 +108,16 @@ class GeneratedAttributeTest < Rails::Generators::TestCase ) end end + + def test_nil_type_raises_exception + assert_raise Thor::Error do + create_generated_attribute(nil, 'title') + end + end + + def test_missing_type_raises_exception + assert_raise Thor::Error do + create_generated_attribute(:'', 'title') + end + end end |