diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-02-06 02:25:55 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-02-06 02:25:55 +0000 |
commit | b9ba2fe55059a6d9f141d1d502e16bdfd46f26cb (patch) | |
tree | 491c3ce7d406a723e5c06e3bccf4559a0de86199 /activerecord/test/cases/associations | |
parent | 97612394672203eefd04e3b1947273a3ab4ec930 (diff) | |
parent | 96d610553e5fdaabc923835ab1f194070ddb4477 (diff) | |
download | rails-b9ba2fe55059a6d9f141d1d502e16bdfd46f26cb.tar.gz rails-b9ba2fe55059a6d9f141d1d502e16bdfd46f26cb.tar.bz2 rails-b9ba2fe55059a6d9f141d1d502e16bdfd46f26cb.zip |
Merge commit 'mainstream/master'
Conflicts:
railties/guides/files/javascripts/code_highlighter.js
railties/guides/files/javascripts/guides.js
railties/guides/files/javascripts/highlighters.js
railties/guides/files/stylesheets/main.css
railties/guides/files/stylesheets/print.css
railties/guides/files/stylesheets/reset.css
railties/guides/files/stylesheets/style.css
railties/guides/files/stylesheets/syntax.css
railties/guides/rails_guides/indexer.rb
railties/guides/source/2_2_release_notes.textile
railties/guides/source/2_3_release_notes.textile
railties/guides/source/action_controller_overview.textile
railties/guides/source/action_mailer_basics.textile
railties/guides/source/active_record_basics.textile
railties/guides/source/activerecord_validations_callbacks.textile
railties/guides/source/association_basics.textile
railties/guides/source/caching_with_rails.textile
railties/guides/source/command_line.textile
railties/guides/source/debugging_rails_applications.textile
railties/guides/source/form_helpers.textile
railties/guides/source/getting_started.textile
railties/guides/source/i18n.textile
railties/guides/source/layout.html.erb
railties/guides/source/layouts_and_rendering.textile
railties/guides/source/migrations.textile
railties/guides/source/performance_testing.textile
railties/guides/source/plugins.textile
railties/guides/source/rails_on_rack.textile
railties/guides/source/routing.textile
railties/guides/source/security.textile
railties/guides/source/testing.textile
Diffstat (limited to 'activerecord/test/cases/associations')
4 files changed, 17 insertions, 25 deletions
diff --git a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb index 1e3b423471..0f43d97f4a 100644 --- a/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb @@ -767,12 +767,10 @@ class HasAndBelongsToManyAssociationsTest < ActiveRecord::TestCase assert_equal 1, developer.projects.count end - uses_mocha 'mocking Post.transaction' do - def test_association_proxy_transaction_method_starts_transaction_in_association_class - Post.expects(:transaction) - Category.find(:first).posts.transaction do - # nothing - end + def test_association_proxy_transaction_method_starts_transaction_in_association_class + Post.expects(:transaction) + Category.find(:first).posts.transaction do + # nothing end end diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 428fb50013..a2525f1d70 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1097,12 +1097,10 @@ class HasManyAssociationsTest < ActiveRecord::TestCase ActiveRecord::Base.store_full_sti_class = old end - uses_mocha 'mocking Comment.transaction' do - def test_association_proxy_transaction_method_starts_transaction_in_association_class - Comment.expects(:transaction) - Post.find(:first).comments.transaction do - # nothing - end + def test_association_proxy_transaction_method_starts_transaction_in_association_class + Comment.expects(:transaction) + Post.find(:first).comments.transaction do + # nothing end end diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index ad6a5d6840..1e5d1a0202 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -228,12 +228,10 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase assert !person.posts.loaded? end - uses_mocha 'mocking Tag.transaction' do - def test_association_proxy_transaction_method_starts_transaction_in_association_class - Tag.expects(:transaction) - Post.find(:first).tags.transaction do - # nothing - end + def test_association_proxy_transaction_method_starts_transaction_in_association_class + Tag.expects(:transaction) + Post.find(:first).tags.transaction do + # nothing end end diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index 7a0427aabc..b1060d01af 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -510,13 +510,11 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase assert !author.comments.loaded? end - uses_mocha('has_many_through_collection_size_uses_counter_cache_if_it_exists') do - def test_has_many_through_collection_size_uses_counter_cache_if_it_exists - author = authors(:david) - author.stubs(:read_attribute).with('comments_count').returns(100) - assert_equal 100, author.comments.size - assert !author.comments.loaded? - end + def test_has_many_through_collection_size_uses_counter_cache_if_it_exists + author = authors(:david) + author.stubs(:read_attribute).with('comments_count').returns(100) + assert_equal 100, author.comments.size + assert !author.comments.loaded? end def test_adding_junk_to_has_many_through_should_raise_type_mismatch |