spec/pgresult_spec.rb in pg-0.9.0 vs spec/pgresult_spec.rb in pg-0.10.0
- old
+ new
@@ -7,20 +7,19 @@
basedir = Pathname( __FILE__ ).dirname.parent
libdir = basedir + 'lib'
archlib = libdir + Config::CONFIG['sitearch']
+ $LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
$LOAD_PATH.unshift( archlib.to_s ) unless $LOAD_PATH.include?( archlib.to_s )
}
+require 'rspec'
+require 'spec/lib/helpers'
require 'pg'
-require 'rubygems'
-require 'spec'
-require 'spec/lib/helpers'
-
describe PGresult do
include PgTestingHelpers
before( :all ) do
@conn = setup_testing_db( "PGresult" )
@@ -203,11 +202,9 @@
"column with no corresponding table" do
@conn.exec( 'CREATE TABLE ftablecoltest ( foo text )' )
res = @conn.exec( 'SELECT foo, LENGTH(foo) as length FROM ftablecoltest' )
res.ftablecol(1).should == 0 # and it shouldn't raise an exception, either
end
-
-
after( :each ) do
@conn.exec( 'ROLLBACK' )
end