提交 c6e10c0b 编写于 作者: R Ryuta Kamizono

Fix `ActiveRecord::FixtureSet` docs [ci skip]

`ActiveSupport::TestCase` was replaced `ActiveRecord::TestCase` in #26150.
But this docs is for rails apps per se, it should be `ActiveSupport::TestCase`.

See https://github.com/rails/rails/pull/26150#discussion_r74710989.
上级 5c2c6966
......@@ -14,7 +14,7 @@ class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc:
# \Fixtures are a way of organizing data that you want to test against; in short, sample data.
#
# They are stored in YAML files, one file per model, which are placed in the directory
# appointed by <tt>ActiveRecord::TestCase.fixture_path=(path)</tt> (this is automatically
# appointed by <tt>ActiveSupport::TestCase.fixture_path=(path)</tt> (this is automatically
# configured for Rails, so you can just put your files in <tt><your-rails-app>/test/fixtures/</tt>).
# The fixture file ends with the +.yml+ file extension, for example:
# <tt><your-rails-app>/test/fixtures/web_sites.yml</tt>).
......@@ -57,7 +57,7 @@ class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc:
#
# require 'test_helper'
#
# class WebSiteTest < ActiveRecord::TestCase
# class WebSiteTest < ActiveSupport::TestCase
# test "web_site_count" do
# assert_equal 2, WebSite.count
# end
......@@ -89,7 +89,7 @@ class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc:
# end
#
# In order to use these methods to access fixtured data within your testcases, you must specify one of the
# following in your ActiveRecord::TestCase-derived class:
# following in your ActiveSupport::TestCase-derived class:
#
# - to fully enable instantiated fixtures (enable alternate methods #1 and #2 above)
# self.use_instantiated_fixtures = true
......@@ -144,7 +144,7 @@ class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc:
# Test cases can use begin+rollback to isolate their changes to the database instead of having to
# delete+insert for every test case.
#
# class FooTest < ActiveRecord::TestCase
# class FooTest < ActiveSupport::TestCase
# self.use_transactional_tests = true
#
# test "godzilla" do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册