Skip to content

Update Readme #1703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 28, 2016
Merged

Update Readme #1703

merged 1 commit into from
Sep 28, 2016

Conversation

theterminalguy
Copy link

  • added more ways to run specific test examples
  • added on the Upgrade Note section the new changes to Rails 5
    controller testing

hacktoberfest

Copy link
Member

@JonRowe JonRowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to improve our documentation, it's appreciated! I've left some feedback in this review :)


# Skip all specs that are tagged slow
bundle exec rspec spec/controllers/accounts_controller_spec.rb --tag "~slow"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of arbitrary, theres a lot of different ways to run specs and this is still only a few.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

```
You can find out more about rspec tags [here.](https://relishapp.com/rspec/rspec-core/v/2-3/docs/command-line/tag-option)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than doing this (and linking to an unsupported version of the docs) can you link to the documentation about how to run different combination of specs, then you can eliminate the arbitrary examples above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -86,6 +97,7 @@ There are three particular `rspec-rails` specific changes to be aware of:
3. [Rails 4.x `ActiveRecord::Migration` pending migration checks](https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#pending-migration-checks)
4. Extraction of `stub_model` and `mock_model` to
[`rspec-activemodel-mocks`](https://github.com/rspec/rspec-activemodel-mocks)
5. In Rails 5.x, controller testing has been moved to its own gem which is [rails-controller-testing](https://github.com/rails/rails-controller-testing). So using `assings` in your controller test without adding this gem would raise an exception.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a typo here, assings instead of assigns and would you mind re-wording it slightly? It reads better as

Using assigns in your controller specs without adding this gem will no longer work.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -594,4 +606,4 @@ task("spec").clear

## Feature Requests & Bugs

See <http://github.com/rspec/rspec-rails/issues>
See <http://github.com/rspec/rspec-rails/issues>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert whatever this change is.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I guess that just one more line added. Will do that now

- added changes to the Upgrade Note section about Rails 5 and controller
  testing
@theterminalguy
Copy link
Author

All fix have been implemented

@JonRowe
Copy link
Member

JonRowe commented Sep 28, 2016

Did you want to add the link to more detailed documenation on how to run specs?

@theterminalguy
Copy link
Author

theterminalguy commented Sep 28, 2016

@JonRowe so the issues is that I can't point to a single article/documentation on https://www.relishapp.com that suggest how specs ar run. Since there are various ways to running specs for different versions of RSpec. In addition, I don't want to point to any article outside relishapp.

@JonRowe JonRowe merged commit 2175c72 into rspec:master Sep 28, 2016
@JonRowe
Copy link
Member

JonRowe commented Sep 28, 2016

Thanks

sebjacobs pushed a commit to futurelearn/rspec-rails that referenced this pull request Mar 15, 2019
- added changes to the Upgrade Note section about Rails 5 and controller
  testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants