Skip to content

Commit

Permalink
Remove some spec guards related to swift
Browse files Browse the repository at this point in the history
Some of the swift/sqlite specific ones were added recently to
work around memory issues in swift-db-sqlite3, which have been
fixed in version 0.1.2.  Others also appear to be run correctly
and should be enabled.
  • Loading branch information
jeremyevans committed Jul 30, 2012
1 parent f181c61 commit 53dfbbe
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions spec/integration/dataset_test.rb
Expand Up @@ -783,13 +783,13 @@
@db.drop_table?(:imp)
end

cspecify "should return primary key values", [:swift, :sqlite] do
specify "should return primary key values" do
@ds.multi_insert([{:i=>10}, {:i=>20}, {:i=>30}], :return=>:primary_key).should == [1, 2, 3]
@ds.import([:i], [[40], [50], [60]], :return=>:primary_key).should == [4, 5, 6]
@ds.order(:id).map([:id, :i]).should == [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 60]]
end

cspecify "should return primary key values when :slice is used", [:swift, :sqlite] do
specify "should return primary key values when :slice is used" do
@ds.multi_insert([{:i=>10}, {:i=>20}, {:i=>30}], :return=>:primary_key, :slice=>2).should == [1, 2, 3]
@ds.import([:i], [[40], [50], [60]], :return=>:primary_key, :slice=>2).should == [4, 5, 6]
@ds.order(:id).map([:id, :i]).should == [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 60]]
Expand Down
10 changes: 5 additions & 5 deletions spec/integration/plugin_test.rb
Expand Up @@ -322,7 +322,7 @@ def self_join(c)
c.exclude(:related_artists=>c.filter(:artists__id=>@artist1.id)).all.map{|a| a.name}.sort.should == %w'3'
end

cspecify "should handle extreme case with 5 join tables", [:swift, :sqlite] do
specify "should handle extreme case with 5 join tables" do
Artist.many_through_many :related_albums, [[:albums_artists, :artist_id, :album_id], [:albums, :id, :id], [:albums_artists, :album_id, :artist_id], [:artists, :id, :id], [:albums_artists, :artist_id, :album_id]], :class=>Album, :distinct=>true
@db[:albums_artists].delete
@album1.add_artist(@artist1)
Expand Down Expand Up @@ -1265,7 +1265,7 @@ class ::Tag < Sequel::Model
@db.drop_table?(:pages)
end

cspecify "should return rows in order of position", [:swift, :sqlite] do
specify "should return rows in order of position" do
@c.map(:name).should == %w[ Hm Ps Au P1 P2 P3 ]
end

Expand All @@ -1286,7 +1286,7 @@ class ::Tag < Sequel::Model
@c[:name => "P3"].next.should == nil
end

cspecify "should define move_to", [:swift, :sqlite] do
specify "should define move_to" do
@c[:name => "P2"].move_to(1)
@c.map(:name).should == %w[ Hm Ps Au P2 P1 P3 ]

Expand All @@ -1297,15 +1297,15 @@ class ::Tag < Sequel::Model
proc { @c[:name => "P2"].move_to(10) }.should raise_error(Sequel::Error)
end

cspecify "should define move_to_top and move_to_bottom", [:swift, :sqlite] do
specify "should define move_to_top and move_to_bottom" do
@c[:name => "Au"].move_to_top
@c.map(:name).should == %w[ Hm Au Ps P1 P2 P3 ]

@c[:name => "Au"].move_to_bottom
@c.map(:name).should == %w[ Hm Ps Au P1 P2 P3 ]
end

cspecify "should define move_up and move_down", [:swift, :sqlite] do
specify "should define move_up and move_down" do
@c[:name => "P2"].move_up
@c.map(:name).should == %w[ Hm Ps Au P2 P1 P3 ]

Expand Down
4 changes: 2 additions & 2 deletions spec/integration/prepared_statement_test.rb
Expand Up @@ -287,12 +287,12 @@
@ds.filter(:d=>:$x).prepare(:first, :ps_date).call(:x=>@vs[:d])[:d].should == @vs[:d]
end

cspecify "should handle datetime type", [:do], [:mysql2], [:swift], [:jdbc, :sqlite], [:tinytds], [:oracle] do
cspecify "should handle datetime type", [:do], [:mysql2], [:jdbc, :sqlite], [:tinytds], [:oracle] do
Sequel.datetime_class = DateTime
@ds.filter(:dt=>:$x).prepare(:first, :ps_datetime).call(:x=>@vs[:dt])[:dt].should == @vs[:dt]
end

cspecify "should handle datetime type with fractional seconds", [:do], [:mysql2], [:swift], [:jdbc, :sqlite], [:tinytds], [:oracle] do
cspecify "should handle datetime type with fractional seconds", [:do], [:mysql2], [:jdbc, :sqlite], [:tinytds], [:oracle] do
Sequel.datetime_class = DateTime
fract_time = DateTime.parse('2010-10-12 13:14:15.500000')
@ds.prepare(:update, :ps_datetime_up, :dt=>:$x).call(:x=>fract_time)
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/schema_test.rb
Expand Up @@ -252,7 +252,7 @@
@ds.columns!.should == [:number]
end

cspecify "should create tables from select statements correctly", [:swift, :sqlite] do
specify "should create tables from select statements correctly" do
@db.create_table!(:items){Integer :number}
@ds.insert([10])
@db.create_table(:items2, :as=>@db[:items])
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/timezone_test.rb
Expand Up @@ -58,7 +58,7 @@ def test_timezone(timezone=Sequel.application_timezone)
test_timezone
end

cspecify "should support using UTC for both database storage and for application", [:swift], [:do, :mysql], [:do, :postgres], [:oracle] do
cspecify "should support using UTC for both database storage and for application", [:do, :mysql], [:do, :postgres], [:oracle] do
Sequel.default_timezone = :utc
test_timezone
Sequel.database_timezone = :local
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/type_test.rb
Expand Up @@ -33,7 +33,7 @@ def create_items_table_with_column(name, type, opts={})
ds.all.should == [{:number=>2}]
end

cspecify "should support generic bignum type", [:swift, :sqlite] do
specify "should support generic bignum type" do
ds = create_items_table_with_column(:number, Bignum)
ds.insert(:number => 2**34)
ds.all.should == [{:number=>2**34}]
Expand Down Expand Up @@ -93,7 +93,7 @@ def create_items_table_with_column(name, type, opts={})
ds.first[:tim].strftime('%Y%m%d%H%M%S').should == t.strftime('%Y%m%d%H%M%S')
end

cspecify "should support generic file type", [:do], [:odbc, :mssql], [:mysql2], [:swift], [:tinytds] do
cspecify "should support generic file type", [:do], [:odbc, :mssql], [:mysql2], [:tinytds] do
ds = create_items_table_with_column(:name, File)
ds.insert(:name =>Sequel.blob("a\0"*300))
ds.all.should == [{:name=>Sequel.blob("a\0"*300)}]
Expand Down

0 comments on commit 53dfbbe

Please sign in to comment.