Permalink
Browse files

minor: alias #read_primary? with #primary?

  • Loading branch information...
1 parent 0d91faf commit fab538ed5ed3491d9e0277a7da0e9f2db4b9720b @banker banker committed Jan 17, 2011
View
@@ -470,6 +470,7 @@ def connected?
def read_primary?
@read_primary
end
+ alias :primary? :read_primary?
# Close the connection to the database.
def close
@@ -137,6 +137,7 @@ def connecting?
def read_primary?
!@read_pool || @read_pool.length.zero?
end
+ alias :primary? :read_primary?
# Close the connection to the database.
def close
@@ -32,6 +32,7 @@ def test_connect
[RS.host, RS.ports[2]], :name => RS.name)
assert @conn.connected?
assert @conn.read_primary?
+ assert @conn.primary?
assert_equal RS.primary, @conn.primary
assert_equal RS.secondaries.sort, @conn.secondaries.sort
@@ -18,6 +18,7 @@ def teardown
def test_read_primary
assert !@conn.read_primary?
+ assert !@conn.primary?
end
def test_con

0 comments on commit fab538e

Please sign in to comment.