aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/lib/action_controller/caching.rb1
-rw-r--r--activerecord/lib/active_record/associations.rb6
-rw-r--r--activerecord/lib/active_record/base.rb1
-rw-r--r--guides/source/debugging_rails_applications.md3
-rw-r--r--guides/source/testing.md17
-rw-r--r--railties/test/application/initializers/frameworks_test.rb1
6 files changed, 16 insertions, 13 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index a4e4992cfe..2801db0154 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -1,6 +1,5 @@
require 'fileutils'
require 'uri'
-require 'set'
module ActionController
# \Caching is a cheap way of speeding up slow applications by keeping the result of
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index a830b0e0e4..19ef37e228 100644
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -619,10 +619,10 @@ module ActiveRecord
# @tag = @post.tags.build name: "ruby"
# @tag.save
#
- # The last line ought to save the through record (a <tt>Taggable</tt>). This will only work if the
+ # The last line ought to save the through record (a <tt>Tagging</tt>). This will only work if the
# <tt>:inverse_of</tt> is set:
#
- # class Taggable < ActiveRecord::Base
+ # class Tagging < ActiveRecord::Base
# belongs_to :post
# belongs_to :tag, inverse_of: :taggings
# end
@@ -643,7 +643,7 @@ module ActiveRecord
# You can turn off the automatic detection of inverse associations by setting
# the <tt>:inverse_of</tt> option to <tt>false</tt> like so:
#
- # class Taggable < ActiveRecord::Base
+ # class Tagging < ActiveRecord::Base
# belongs_to :tag, inverse_of: false
# end
#
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 55a7e053bc..4b66d8cd36 100644
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1,5 +1,4 @@
require 'yaml'
-require 'set'
require 'active_support/benchmarkable'
require 'active_support/dependencies'
require 'active_support/descendants_tracker'
diff --git a/guides/source/debugging_rails_applications.md b/guides/source/debugging_rails_applications.md
index fe8757fbd5..a05abb61d6 100644
--- a/guides/source/debugging_rails_applications.md
+++ b/guides/source/debugging_rails_applications.md
@@ -623,7 +623,8 @@ Processing by ArticlesController#index as HTML
If we use `next`, we won't go deep inside method calls. Instead, `byebug` will
go to the next line within the same context. In this case, it is the last line
of the current method, so `byebug` will return to the next line of the caller
-+method.
+method.
+
```
(byebug) next
diff --git a/guides/source/testing.md b/guides/source/testing.md
index 3a691220cf..1cc49a36d2 100644
--- a/guides/source/testing.md
+++ b/guides/source/testing.md
@@ -50,7 +50,7 @@ By default, every Rails application has three environments: development, test, a
Each environment's configuration can be modified similarly. In this case, we can modify our test environment by changing the options found in `config/environments/test.rb`.
-NOTE: Your test are run under RAILS_ENV=test.
+NOTE: Your tests are run under `RAILS_ENV=test`.
### Rails meets Minitest
@@ -336,7 +336,8 @@ All the basic assertions such as `assert_equal` defined in `Minitest::Assertions
Each of these classes include `Minitest::Assertions`, allowing us to use all of the basic assertions in our tests.
-NOTE: For more information on `Minitest`, refer to [Minitest](http://docs.seattlerb.org/minitest)
+NOTE: For more information on `Minitest`, refer to [its
+documentation](http://docs.seattlerb.org/minitest).
### The Rails Test Runner
@@ -355,7 +356,8 @@ Finished tests in 0.009262s, 107.9680 tests/s, 107.9680 assertions/s.
This will run all test methods from the test case.
-You can also run a particular test method from the test case by providing the `-n` or `--name` flag and the `test method name`.
+You can also run a particular test method from the test case by providing the
+`-n` or `--name` flag and the test's method name.
```bash
$ bin/rails test test/models/article_test.rb -n test_the_truth
@@ -469,7 +471,8 @@ user_<%= n %>:
#### Fixtures in Action
-Rails by default automatically loads all fixtures from the `test/fixtures` directory for your models and controllers test. Loading involves three steps:
+Rails automatically loads all fixtures from the `test/fixtures` directory by
+default. Loading involves three steps:
1. Remove any existing data from the table corresponding to the fixture
2. Load the fixture data into the table
@@ -505,7 +508,8 @@ Model Testing
Model tests are used to test the various models of your application.
-For creating Rails model tests, we use the 'test/model' directory for your application. Rails provides a generator to create an model test skeleton for you.
+Rails model tests are stored under the `test/models` directory. Rails provides
+a generator to create a model test skeleton for you.
```bash
$ bin/rails generate test_unit:model article title:string body:text
@@ -563,7 +567,8 @@ We'll start by generating our integration test skeleton:
$ bin/rails generate integration_test blog_flow
```
-It should have created a test file placeholder for us, with the output of the previous command you should see:
+It should have created a test file placeholder for us. With the output of the
+previous command you should see:
```bash
invoke test_unit
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb
index 7bba910b9e..6e3707cc27 100644
--- a/railties/test/application/initializers/frameworks_test.rb
+++ b/railties/test/application/initializers/frameworks_test.rb
@@ -1,5 +1,4 @@
require "isolation/abstract_unit"
-require 'set'
module ApplicationTests
class FrameworksTest < ActiveSupport::TestCase