Permalink
Browse files

Fix tests

  • Loading branch information...
rafaelfranca committed Feb 1, 2014
1 parent 7971cb2 commit e6003cb4053c71d451cf6123ceaf396286edfe9a
Showing with 8 additions and 11 deletions.
  1. +8 −11 activerecord/test/cases/adapters/postgresql/array_test.rb
@@ -81,23 +81,19 @@ def test_select
end
def test_multi_dimensional_with_strings
- assert_cycle(:tags, [[['1'], ['2']], [['2'], ['3']]])
+ assert_cycle([[['1'], ['2']], [['2'], ['3']]])
end
def test_with_empty_strings
- assert_cycle(:tags, [ '1', '2', '', '4', '', '5' ])
+ assert_cycle([ '1', '2', '', '4', '', '5' ])
end
def test_with_multi_dimensional_empty_strings
- assert_cycle(:tags, [[['1', '2'], ['', '4'], ['', '5']]])
+ assert_cycle([[['1', '2'], ['', '4'], ['', '5']]])
end
def test_with_arbitrary_whitespace
- assert_cycle(:tags, [[['1', '2'], [' ', '4'], [' ', '5']]])
- end
-
- def test_multi_dimensional_with_integers
- assert_cycle(:ratings, [[[1], [7]], [[8], [10]]])
+ assert_cycle([[['1', '2'], [' ', '4'], [' ', '5']]])
end
def test_strings_with_quotes
@@ -137,14 +133,15 @@ def test_update_all
end
private
- def assert_cycle array
+
+ def assert_cycle(array)
# test creation
- x = PgArray.create!(:tags => array)
+ x = PgArray.create!(tags: array)
x.reload
assert_equal(array, x.tags)
# test updating
- x = PgArray.create!(:tags => [])
+ x = PgArray.create!(tags: [])
x.tags = array
x.save!
x.reload

0 comments on commit e6003cb

Please sign in to comment.