Permalink
Browse files

Fixed anonymous columns

  • Loading branch information...
1 parent 2d157d9 commit 8c07467e668767333882fe436b8305ef47854333 Nusco+Beppe committed Jul 29, 2008
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/sequel_core/adapters/ado.rb
  2. +2 −2 spec/adapters/ado_spec.rb
@@ -59,7 +59,7 @@ def fetch_rows(sql, &block)
s = @db.execute sql
@columns = s.Fields.extend(Enumerable).map do |column|
- name = column.Name.empty? ? 'no column name' : column.Name
+ name = column.Name.empty? ? '(no column name)' : column.Name
name.to_sym
end
@@ -1,7 +1,7 @@
require File.join(File.dirname(__FILE__), 'spec_helper.rb')
unless defined?(ADO_DB)
- ADO_DB = Sequel.ado(:host => 'AZTEC', :database => 'Uno_test', :user => 'sa', :password => 'sadev')
+ ADO_DB = Sequel.ado(:host => 'MY_SQL_SERVER', :database => 'MyDB', :user => 'my_pwd', :password => 'my_usr')
end
context "An ADO dataset" do
@@ -23,7 +23,7 @@
specify "should assign a default name to anonymous columns" do
col = ADO_DB.fetch('SELECT COUNT(*) FROM items').columns[0]
- col.name.should == '(no column name)'
+ col.to_s.should == '(no column name)'
end
specify "should support counting" do

0 comments on commit 8c07467

Please sign in to comment.