Skip to content

Commit 9d55ab4

Browse files
committed
Backport pull request #1093 from rspec/rails-4-schema-changes-docs
A few more grammar changes based on feedback. - Remove the reference to "magical" to clear up it's meaning - Make statements more declarative by removing personal "you"
1 parent f0a396e commit 9d55ab4

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

features/upgrade/README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ end
8888
```
8989

9090
This change was made to accomplish our general goals of acting with the principle
91-
of least surprise and removing magic from RSpec. See [the directory structure
92-
documentation](https://www.relishapp.com/rspec/rspec-rails/v/3-0/docs/directory-structure) for more details.
91+
of least surprise and making RSpec configuration more explicit. See [the
92+
directory structure documentation](https://www.relishapp.com/rspec/rspec-rails/v/3-0/docs/directory-structure) for more details.
9393

9494
<a name="pending-migration-checks"></a>
9595
## Rails 4.x `ActiveRecord::Migration` pending migration checks
@@ -136,19 +136,22 @@ standard migration checks, mirroring behavior across the board.
136136
now only be raised if there are pending migrations afterwards the schema
137137
has been loaded.
138138

139-
There are a few things you still need to be aware of with this:
140-
- you still need to run the migrations manually, except now you just run
141-
them in your development environment
142-
- if you have not initialized the schema an exception will be raised
143-
stating you need to run `rake db:migrate` first
139+
There are a few caveates to be aware of when using this:
144140

145-
If you wish to opt-out of checking the pending migrations, you should set this
146-
on the Rails side. To do this, add the following to your
141+
- Migrations still need to be run manually; although now this only has to
142+
be done in the 'development' environment
143+
- An exception will be raised If the schema has not been initialized. The
144+
exception will provide instructions stating `rake db:migrate` needs to
145+
be run.
146+
147+
It is possible to opt-out of checking for pending migrations. Since this is
148+
actually a feature of Rails, the change needs to be done as part of the Rails
149+
configuration. To do this, add the following to your
147150
`config/environments/test.rb` file:
148151

149152
```ruby
150153
config.active_record.maintain_test_schema = false
151154
```
152155

153156
New RSpec projects don't need to worry about these commands as the `rails
154-
generate rspec:install` will add them for you.
157+
generate rspec:install` will add them automatically.

0 commit comments

Comments
 (0)