Sha256: ba09aac7edf4f5b25bcbed1d028bc23809d4aa3b9e76eedf491ded02e1787d1c
Contents?: true
Size: 800 Bytes
Versions: 9
Compression:
Stored size: 800 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Lolita::DBI::Base do # before(:each) do # @base = Base.new # end it "should raise error when not ORM class is given" do lambda{ Lolita::DBI::Base.new(String) }.should raise_error Lolita::NotORMClassError lambda{ Lolita::DBI::Base.new() }.should raise_error ArgumentError end it "should detect adapter" do dbi=Lolita::DBI::Base.new(Post) dbi.klass.should == Post Lolita::DBI::Base.adapters.should include(dbi.adapter_name) end it "should connect adapter" do dbi=Lolita::DBI::Base.new(Post) lambda{ dbi.fields }.should_not raise_error end it "should display all adapter available" do Lolita::DBI::Base.adapters.size.should > 0 end end
Version data entries
9 entries across 9 versions & 1 rubygems