Permalink
Browse files

fixed table integration spec

  • Loading branch information...
1 parent eecad6e commit 4dab545ea393c387e64328a3941e2f5232e0a944 @purzelrakete purzelrakete committed Feb 17, 2012
Showing with 7 additions and 3 deletions.
  1. +6 −2 spec/integration/integration_helper.rb
  2. +1 −1 spec/integration/table_spec.rb
@@ -102,8 +102,12 @@ def count_all(table)
def key?(table_name, cols, type = :non_unique)
non_unique = type == :non_unique ? 1 : 0
key_name = Lhm::SqlHelper.idx_name(table_name, cols)
- query = "show indexes in #{ table_name } where key_name = '#{ key_name }' and non_unique = #{ non_unique }"
- !!select_value(query)
+
+ !!select_value(%Q<
+ show indexes in #{ table_name }
+ where key_name = '#{ key_name }'
+ and non_unique = #{ non_unique }
+ >)
end
#
@@ -13,7 +13,7 @@
describe "create table parsing" do
before(:each) do
connect_master!
- @table = Lhm::Table::Parser.new(:users, connection).parse
+ @table = table_create(:users)
end
it "should parse table name in show create table" do

0 comments on commit 4dab545

Please sign in to comment.