Skip to content

Commit

Permalink
Minor fix for nondeterminism in MSSQL spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Jul 21, 2010
1 parent 5871db8 commit 5cd6339
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/adapters/mssql_spec.rb
Expand Up @@ -63,8 +63,9 @@ def logger.method_missing(m, msg)
specify "should emulate the USING clause with ON" do
MSSQL_DB[:items].join(:categories, [:id]).sql.should ==
'SELECT * FROM ITEMS INNER JOIN CATEGORIES ON (CATEGORIES.ID = ITEMS.ID)'
MSSQL_DB[:items].join(:categories, [:id1, :id2]).sql.should ==
'SELECT * FROM ITEMS INNER JOIN CATEGORIES ON ((CATEGORIES.ID1 = ITEMS.ID1) AND (CATEGORIES.ID2 = ITEMS.ID2))'
['SELECT * FROM ITEMS INNER JOIN CATEGORIES ON ((CATEGORIES.ID1 = ITEMS.ID1) AND (CATEGORIES.ID2 = ITEMS.ID2))',
'SELECT * FROM ITEMS INNER JOIN CATEGORIES ON ((CATEGORIES.ID2 = ITEMS.ID2) AND (CATEGORIES.ID1 = ITEMS.ID1))'].
should include(MSSQL_DB[:items].join(:categories, [:id1, :id2]).sql)
MSSQL_DB[:items___i].join(:categories___c, [:id]).sql.should ==
'SELECT * FROM ITEMS AS I INNER JOIN CATEGORIES AS C ON (C.ID = I.ID)'
end
Expand Down

0 comments on commit 5cd6339

Please sign in to comment.