Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removing tests of deprecated methods

  • Loading branch information...
commit 87c022bc98c57027f534d5e667cfc0344b5b40f0 1 parent f694d9e
@tenderlove tenderlove authored
Showing with 2 additions and 36 deletions.
  1. +2 −4 test/test_crud.rb
  2. +0 −32 test/test_table.rb
View
6 test/test_crud.rb
@@ -35,10 +35,8 @@ def initialize engine = FakeEngine.new
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
View
32 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
Please sign in to comment.
Something went wrong with that request. Please try again.