aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-12-14 08:47:57 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-12-14 08:47:57 -0800
commit87c022bc98c57027f534d5e667cfc0344b5b40f0 (patch)
tree76d95bcb374034dbf7aab05afa2da243df38c8de
parentf694d9e7c332cf4d9bce6742b440bf97308cefb5 (diff)
downloadrails-87c022bc98c57027f534d5e667cfc0344b5b40f0.tar.gz
rails-87c022bc98c57027f534d5e667cfc0344b5b40f0.tar.bz2
rails-87c022bc98c57027f534d5e667cfc0344b5b40f0.zip
removing tests of deprecated methods
-rw-r--r--test/test_crud.rb6
-rw-r--r--test/test_table.rb32
2 files changed, 2 insertions, 36 deletions
diff --git a/test/test_crud.rb b/test/test_crud.rb
index ebe5d68908..fe3e4f2e02 100644
--- a/test/test_crud.rb
+++ b/test/test_crud.rb
@@ -35,10 +35,8 @@ module Arel
table = Table.new :users
fc = FakeCrudder.new
fc.from table
- fc.insert [[table[:id], 'foo']]
- fc.engine.calls.find { |method, _|
- method == :insert
- }.wont_be_nil
+ im = fc.compile_insert [[table[:id], 'foo']]
+ assert_instance_of Arel::InsertManager, im
end
end
diff --git a/test/test_table.rb b/test/test_table.rb
index 65454d402b..42362b563e 100644
--- a/test/test_table.rb
+++ b/test/test_table.rb
@@ -48,12 +48,6 @@ module Arel
end
end
- describe 'primary_key' do
- it 'should return an attribute' do
- @relation.primary_key.name.must_equal :id
- end
- end
-
describe 'select_manager' do
it 'should return an empty select manager' do
sm = @relation.select_manager
@@ -113,13 +107,6 @@ module Arel
end
describe 'new' do
- it 'takes :columns' do
- columns = Table.engine.connection.columns("users")
- @relation = Table.new(:users, :columns => columns)
- @relation.columns.first.name.must_equal :id
- @relation.engine.must_equal Table.engine
- end
-
it 'should accept an engine' do
rel = Table.new :users, 'foo'
rel.engine.must_equal 'foo'
@@ -176,14 +163,6 @@ module Arel
end
end
- describe 'columns' do
- it 'returns a list of columns' do
- columns = @relation.columns
- columns.length.must_equal 4
- columns.map { |x| x.name.to_s }.sort.must_equal %w{ created_at bool name id }.sort
- end
- end
-
it "should have a name" do
@relation.name.must_equal 'users'
end
@@ -201,15 +180,4 @@ module Arel
end
end
end
-
- describe Table do
- describe 'when checking the existence of a table' do
- it 'should be present in the table cache despite the class of its name' do
- [ 'users', :users ].each do |name|
- relation = Table.new name
- Table.table_cache(relation.engine).key?(relation.name).must_equal true
- end
- end
- end
- end
end