aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/tag_helper_test.rb
diff options
context:
space:
mode:
authorBodacious <gavin@katanacode.com>2012-05-20 20:42:16 +0100
committerBodacious <gavin@katanacode.com>2012-05-20 20:42:16 +0100
commit39b9c943b7ec5181c19461d319d8c610ea1bf941 (patch)
treeda061ad89f24205d734b1d217ca30aaf26b93526 /actionpack/test/template/tag_helper_test.rb
parent6ef9fda1a39f45e2d18aba4881f60a19589a2c77 (diff)
downloadrails-39b9c943b7ec5181c19461d319d8c610ea1bf941.tar.gz
rails-39b9c943b7ec5181c19461d319d8c610ea1bf941.tar.bz2
rails-39b9c943b7ec5181c19461d319d8c610ea1bf941.zip
Fixed tag_helper data-attribute bug with BigDecimals
Diffstat (limited to 'actionpack/test/template/tag_helper_test.rb')
-rw-r--r--actionpack/test/template/tag_helper_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb
index 6c325d5abb..e36295569e 100644
--- a/actionpack/test/template/tag_helper_test.rb
+++ b/actionpack/test/template/tag_helper_test.rb
@@ -113,8 +113,8 @@ class TagHelperTest < ActionView::TestCase
def test_data_attributes
['data', :data].each { |data|
- assert_dom_equal '<a data-a-number="1" data-array="[1,2,3]" data-hash="{&quot;key&quot;:&quot;value&quot;}" data-string="hello" data-symbol="foo" />',
- tag('a', { data => { :a_number => 1, :string => 'hello', :symbol => :foo, :array => [1, 2, 3], :hash => { :key => 'value'} } })
+ assert_dom_equal '<a data-a-float="3.14" data-a-big-decimal="-123.456" data-a-number="1" data-array="[1,2,3]" data-hash="{&quot;key&quot;:&quot;value&quot;}" data-string="hello" data-symbol="foo" />',
+ tag('a', { data => { :a_float => 3.14, :a_big_decimal => BigDecimal.new("-123.456"), :a_number => 1, :string => 'hello', :symbol => :foo, :array => [1, 2, 3], :hash => { :key => 'value'} } })
}
end
end