Skip to content

Commit

Permalink
Get 100% spec coverage in database.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Jul 15, 2008
1 parent 6f5c1fe commit 1c40300
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/sequel_core/database_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
Sequel::Database.quote_identifiers = false
Sequel::Database.new({}).quote_identifiers?.should == false
end

specify "should just use a :uri option for jdbc with the full connection string" do
Sequel::Database.should_receive(:adapter_class).once.with(:jdbc).and_return(Sequel::Database)
db = Sequel.connect('jdbc:test://host/db_name')
db.should be_a_kind_of(Sequel::Database)
db.opts[:uri].should == 'jdbc:test://host/db_name'
end
end

context "Database#connect" do
Expand Down
1 change: 1 addition & 0 deletions spec/sequel_model/record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,7 @@
specify "should raise an error if invalid data is used in a date field" do
@c.instance_variable_set(:@db_schema, {:x=>{:type=>:date}})
proc{@c.new.x = 'a'}.should raise_error
proc{@c.new.x = 100}.should raise_error
end

specify "should convert to time for a time field" do
Expand Down

0 comments on commit 1c40300

Please sign in to comment.