-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Updates default configuration to use requests specs #1091
Conversation
Controller specs are out of fashion with Rails anyway, this change seems like a win to me. |
Co-Authored-By: Dorian Marié <dorian@dorianmarie.fr>
5be606e
to
2916c05
Compare
@@ -3,7 +3,7 @@ | |||
module Suspenders | |||
class TestingGenerator < Generators::Base | |||
def add_testing_gems | |||
gem "rspec-rails", "~> 3.6", group: %i[development test] | |||
gem "rspec-rails", "~> 5.1", group: %i[development test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might not have been necessary but it seems like a good idea to upgrade in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generally looking good, thank you for taking this on!
The tests are failing, and it looks like you've forgotten to change the generator template here:
suspenders/lib/suspenders/app_builder.rb
Line 84 in 3afb005
generate.request_specs false |
I suspect changing false
to true
will make it pass, is that correct?
After fixing the test failure and undoing the version bump, looks good to merge!
@@ -4,5 +4,5 @@ module Suspenders | |||
.read("#{File.dirname(__FILE__)}/../../.ruby-version") | |||
.strip | |||
.freeze | |||
VERSION = "1.55.1".freeze | |||
VERSION = "1.55.2".freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we undo this version bump? There are other unreleased changes in mainline and we may want to version them differently. Thank you!
Note that I needed to run |
This pull request is superseded by #1094 because I use my fork |
We were trying out suspenders, e.g.
suspenders projectname
Then did a scaffold
rails g scaffold Book title
Then when running the specs (
rspec
) we got an error related to the views not rendering.A good fix is to use requests specs instead of controller specs, they render the views so they test more code
Fixes #1090
Co-Authored-By: Dorian Marié dorian@dorianmarie.fr