diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/arel/crud_spec.rb | 12 | ||||
-rw-r--r-- | spec/arel/select_manager_spec.rb | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/spec/arel/crud_spec.rb b/spec/arel/crud_spec.rb index ca1b92a041..cc58b8dbce 100644 --- a/spec/arel/crud_spec.rb +++ b/spec/arel/crud_spec.rb @@ -47,5 +47,17 @@ module Arel }.should_not be_nil end end + + describe 'delete' do + it 'should call delete on the connection' do + table = Table.new :users + fc = FakeCrudder.new + fc.from table + fc.delete + fc.engine.calls.find { |method, _| + method == :delete + }.should_not be_nil + end + end end end diff --git a/spec/arel/select_manager_spec.rb b/spec/arel/select_manager_spec.rb index b6e09ea65e..493b79264d 100644 --- a/spec/arel/select_manager_spec.rb +++ b/spec/arel/select_manager_spec.rb @@ -21,6 +21,7 @@ module Arel @executed << sql end alias :update :execute + alias :delete :execute end describe 'select manager' do |