spec/unit/sql/table_modifier_spec.rb in dm-migrations-0.9.11 vs spec/unit/sql/table_modifier_spec.rb in dm-migrations-0.10.0

- old
+ new

@@ -1,15 +1,12 @@ -require 'pathname' -require Pathname(__FILE__).dirname + '../../spec_helper' +require 'spec_helper' -require Pathname(__FILE__).dirname + '../../../lib/sql/table_modifier' - describe 'SQL module' do describe 'TableModifier' do before do @adapter = mock('adapter') - @adapter.stub!(:quote_table_name).and_return(%{'users'}) + @adapter.stub!(:quote_name).and_return(%{'users'}) @tc = SQL::TableModifier.new(@adapter, :users) { } end describe 'initialization' do it 'should set @adapter to the adapter' do @@ -41,10 +38,10 @@ @tc.should respond_to(:table_name) @tc.table_name.should == 'users' end it 'should use the adapter to quote the table name' do - @adapter.should_receive(:quote_table_name).with('users').and_return(%{'users'}) + @adapter.should_receive(:quote_name).with('users').and_return(%{'users'}) @tc.quoted_table_name.should == %{'users'} end end