Browse files

fix build for 1.8.7 and 1.9.2

  • Loading branch information...
1 parent d52c007 commit 7ed611e97640342132ede25a2d9fd288e98e8af4 Francesco Rodriguez committed Feb 8, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/parameters_permit_test.rb
View
4 test/parameters_permit_test.rb
@@ -24,7 +24,7 @@ def assert_filtered_out(params, key)
test 'key: permitted scalar values' do
values = ['a', :a, nil]
- values += [0, 1.0, 2**128, BigDecimal.new(1)]
+ values += [0, 1.0, 2**128, BigDecimal.new('1')]
values += [true, false]
values += [Date.today, Time.now, DateTime.now]
values += [StringIO.new, STDOUT, ActionDispatch::Http::UploadedFile.new(:tempfile => __FILE__)]
@@ -266,7 +266,7 @@ def assert_filtered_out(params, key)
assert_not_nil permitted[:book][:authors_attributes]['0']
assert_not_nil permitted[:book][:authors_attributes]['1']
- assert_empty permitted[:book][:authors_attributes]['2']
+ assert permitted[:book][:authors_attributes]['2'].empty?
assert_equal 'William Shakespeare', permitted[:book][:authors_attributes]['0'][:name]
assert_equal 'Unattributed Assistant', permitted[:book][:authors_attributes]['1'][:name]

0 comments on commit 7ed611e

Please sign in to comment.