Skip to content

Commit

Permalink
using assert_equal() rather than assert()
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 4, 2010
1 parent 9e5190c commit 3cf7474
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test_integration.rb
Expand Up @@ -187,7 +187,7 @@ def test_execute_with_block_with_bind_with_match
def test_execute2_no_block_no_bind_no_match
columns, *rows = @db.execute2( "select * from foo where a > 100" )
assert rows.empty?
assert [ "a", "b" ], columns
assert_equal [ "a", "b" ], columns
end

def test_execute2_with_block_no_bind_no_match
Expand All @@ -202,13 +202,13 @@ def test_execute2_with_block_no_bind_no_match
def test_execute2_no_block_with_bind_no_match
columns, *rows = @db.execute2( "select * from foo where a > ?", 100 )
assert rows.empty?
assert [ "a", "b" ], columns
assert_equal [ "a", "b" ], columns
end

def test_execute2_with_block_with_bind_no_match
called = 0
@db.execute2( "select * from foo where a > ?", 100 ) do |row|
assert [ "a", "b" ], row unless called == 0
assert_equal [ "a", "b" ], row unless called == 0
called += 1
end
assert_equal 1, called
Expand All @@ -217,13 +217,13 @@ def test_execute2_with_block_with_bind_no_match
def test_execute2_no_block_no_bind_with_match
columns, *rows = @db.execute2( "select * from foo where a = 1" )
assert_equal 1, rows.length
assert [ "a", "b" ], columns
assert_equal [ "a", "b" ], columns
end

def test_execute2_with_block_no_bind_with_match
called = 0
@db.execute2( "select * from foo where a = 1" ) do |row|
assert [ "a", "b" ], row unless called == 0
assert_equal [ 1, "foo" ], row unless called == 0
called += 1
end
assert_equal 2, called
Expand All @@ -232,7 +232,7 @@ def test_execute2_with_block_no_bind_with_match
def test_execute2_no_block_with_bind_with_match
columns, *rows = @db.execute2( "select * from foo where a = ?", 1 )
assert_equal 1, rows.length
assert [ "a", "b" ], columns
assert_equal [ "a", "b" ], columns
end

def test_execute2_with_block_with_bind_with_match
Expand Down

0 comments on commit 3cf7474

Please sign in to comment.