diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/arel/table_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb index 28fc95dec5..5c8cfac012 100644 --- a/spec/arel/table_spec.rb +++ b/spec/arel/table_spec.rb @@ -71,6 +71,13 @@ module Arel end describe 'new' do + it 'takes :columns' do + columns = Table.engine.connection.columns("users") + @relation = Table.new(:users, :columns => columns) + check @relation.columns.first.name.should == :id + check @relation.engine.should == Table.engine + end + it 'should accept an engine' do rel = Table.new :users, 'foo' check rel.engine.should == 'foo' |