diff options
author | Akira Matsuda <ronnie@dio.jp> | 2011-05-16 23:43:05 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2011-05-16 23:45:39 +0900 |
commit | 4d1752bfb225e6e973375e10f52063060b49e666 (patch) | |
tree | c78f0bfbc9eb10cf6ebeaf7bec54e556655e7e25 /railties/test/generators | |
parent | 12a4376ae96f79ec0ba889a70a4390531d1d6ffd (diff) | |
download | rails-4d1752bfb225e6e973375e10f52063060b49e666.tar.gz rails-4d1752bfb225e6e973375e10f52063060b49e666.tar.bz2 rails-4d1752bfb225e6e973375e10f52063060b49e666.zip |
generate HTML5 number_field tag for integer fields
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/generated_attribute_test.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/test/generators/generated_attribute_test.rb b/railties/test/generators/generated_attribute_test.rb index 064546a3f3..0d2e624f44 100644 --- a/railties/test/generators/generated_attribute_test.rb +++ b/railties/test/generators/generated_attribute_test.rb @@ -4,8 +4,12 @@ require 'rails/generators/generated_attribute' class GeneratedAttributeTest < Rails::Generators::TestCase include GeneratorsTestHelper + def test_field_type_returns_number_field + assert_field_type :integer, :number_field + end + def test_field_type_returns_text_field - %w(integer float decimal string).each do |attribute_type| + %w(float decimal string).each do |attribute_type| assert_field_type attribute_type, :text_field end end |