Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed TreeManagerShared and related tests. They sucked

  • Loading branch information...
commit 7aacb3afdf305a796ded658ab90e9cd623c7f906 1 parent c291d6c
@zenspider zenspider authored
View
9 spec/support/shared/tree_manager_shared.rb
@@ -1,9 +0,0 @@
-shared_examples_for "TreeManager" do
- describe "clone" do
- it "clones the insert statement" do
- subject.instance_variable_get("@head").should_receive(:clone).and_return(:foo) # TODO: ick.
- dolly = subject.clone
- dolly.instance_variable_get("@head").should == :foo
- end
- end
-end
View
3  test/spec_helper.rb
@@ -6,8 +6,6 @@
require 'support/fake_record'
Arel::Table.engine = Arel::Sql::Engine.new(FakeRecord::Base.new)
-# HACK require 'support/shared/tree_manager_shared'
-
class Object
def must_be_like other
self.gsub(/\s+/, ' ').strip.must_equal other.gsub(/\s+/, ' ').strip
@@ -18,4 +16,3 @@ def check truthiness
raise "not truthy" unless truthiness
end
end
-
View
12 test/test_delete_manager.rb
@@ -38,17 +38,5 @@ module Arel
check dm.where(table[:id].eq(10)).must_equal dm
end
end
-
- # HACK
- # describe "TreeManager" do
- # before do
- # table = Table.new :users
- # Arel::DeleteManager.new(Table.engine).tap do |manager|
- # manager.where(table[:id].eq(10))
- # end
- # end
- #
- # it_should_behave_like "TreeManager"
- # end
end
end
View
12 test/test_insert_manager.rb
@@ -124,17 +124,5 @@ module Arel
}
end
end
-
- # HACK
- # describe "TreeManager" do
- # subject do
- # table = Table.new(:users)
- # Arel::InsertManager.new(Table.engine).tap do |manager|
- # manager.insert [[table[:id], nil]]
- # end
- # end
- #
- # it_should_behave_like "TreeManager"
- # end
end
end
View
12 test/test_select_manager.rb
@@ -577,17 +577,5 @@ def execute sql, name = nil, *args
manager.to_sql.must_be_like 'SELECT "users"."id" FROM "users"'
end
end
-
- # HACK
- # describe "TreeManager" do
- # subject do
- # table = Table.new :users
- # Arel::SelectManager.new(Table.engine).tap do |manager|
- # manager.from(table).project(table['id'])
- # end
- # end
- #
- # it_should_behave_like "TreeManager"
- # end
end
end
View
13 test/test_update_manager.rb
@@ -73,18 +73,5 @@ module Arel
um.where(table[:id].eq(1)).must_equal um
end
end
-
- # HACK
- # describe "TreeManager" do
- # subject do
- # table = Table.new :users
- # Arel::UpdateManager.new(Table.engine).tap do |manager|
- # manager.table table
- # manager.where table[:id].eq(1)
- # end
- # end
- #
- # it_should_behave_like "TreeManager"
- # end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.