Sha256: ae6c123da24d52939ddc23704c9773576afd69ba9a6f6f1fa75f94071817c86c
Contents?: true
Size: 690 Bytes
Versions: 8
Compression:
Stored size: 690 Bytes
Contents
require 'pathname' require Pathname(__FILE__).dirname + '../../spec_helper' require Pathname(__FILE__).dirname + '../../../lib/sql/table' describe SQL::Table do before do @table = SQL::Table.new end %w{name columns}.each do |meth| it "should have a ##{meth} attribute" do @table.should respond_to(meth.intern) end end it 'should #to_s as the name' do @table.name = "table_name" @table.to_s.should == "table_name" end it 'should find a column by name' do column_a = mock('column', :name => 'id') column_b = mock('column', :name => 'login') @table.columns = [column_a, column_b] @table.column('id').should == column_a end end
Version data entries
8 entries across 8 versions & 1 rubygems