aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/arel/table_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb
index b68fdd5a3d..67024f5c52 100644
--- a/spec/arel/table_spec.rb
+++ b/spec/arel/table_spec.rb
@@ -6,6 +6,18 @@ module Arel
@relation = Table.new(:users)
end
+ describe 'new' do
+ it 'should accept an engine' do
+ rel = Table.new :users, 'foo'
+ rel.engine.should == 'foo'
+ end
+
+ it 'should accept a hash' do
+ rel = Table.new :users, :engine => 'foo'
+ rel.engine.should == 'foo'
+ end
+ end
+
describe 'where' do
it "returns a tree manager" do
manager = @relation.where @relation[:id].eq 1