Permalink
Browse files

Fix a couple of spec failures for the native mysql adapter

  • Loading branch information...
1 parent 4afc7ef commit 30e409c4a97005ca7abba6f6981fea333e646dc1 @jeremyevans committed Jun 25, 2010
Showing with 6 additions and 6 deletions.
  1. +6 −6 spec/integration/schema_test.rb
View
12 spec/integration/schema_test.rb
@@ -244,24 +244,24 @@
@ds.all.should == [{:n2=>'blah'}, {:n2=>'blah'}]
end
- cspecify "should rename columns with not null constraints", [:mysql, :mysql] do
- @db.create_table!(:items){String :n, :null=>false}
+ specify "should rename columns with not null constraints" do
+ @db.create_table!(:items, :engine=>:InnoDB){String :n, :null=>false}
@ds.insert(:n=>'blah')
@db.alter_table(:items){rename_column :n, :n2}
@db.schema(:items, :reload=>true).map{|x| x.first}.should == [:n2]
@ds.columns!.should == [:n2]
@ds.insert(:n2=>'blah')
@ds.all.should == [{:n2=>'blah'}, {:n2=>'blah'}]
- proc{@ds.insert}.should raise_error(Sequel::DatabaseError)
+ proc{@ds.insert(:n=>nil)}.should raise_error(Sequel::DatabaseError)
end
- cspecify "should set column NULL/NOT NULL correctly", [:mysql, :mysql] do
- @db.create_table!(:items){Integer :id}
+ specify "should set column NULL/NOT NULL correctly" do
+ @db.create_table!(:items, :engine=>:InnoDB){Integer :id}
@ds.insert(:id=>10)
@db.alter_table(:items){set_column_allow_null :id, false}
@db.schema(:items, :reload=>true).map{|x| x.first}.should == [:id]
@ds.columns!.should == [:id]
- proc{@ds.insert}.should raise_error(Sequel::DatabaseError)
+ proc{@ds.insert(:id=>nil)}.should raise_error(Sequel::DatabaseError)
@db.alter_table(:items){set_column_allow_null :id, true}
@ds.insert
@ds.all.should == [{:id=>10}, {:id=>nil}]

0 comments on commit 30e409c

Please sign in to comment.