-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix smoke test and add workflow #20
base: master
Are you sure you want to change the base?
Conversation
@@ -98,6 +98,7 @@ def self.defaults! | |||
patch "lib/#{dirname}.rb", 'module Rubocop', 'module RuboCop' | |||
patch "lib/#{dirname}/version.rb", 'module Rubocop', 'module RuboCop' | |||
patch "#{name}.gemspec", 'Rubocop', 'RuboCop' | |||
2.times { patch "spec/#{dirname}_spec.rb", 'Rubocop::', 'RuboCop::' } |
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.
Oh, I guess this is an actual bug fix, not just a smoke test fix. The smoke test found the bug, because it would blow up due to the constant being incorrect. See commit message for details.
I don't think the workflow will run on this branch, as it doesn't exist on |
The generated spec looks like RSpec.describe Rubocop::Smoke do it "has a version number" do expect(Rubocop::Smoke::VERSION).not_to be nil end Because `patch` uses `sub`, not `gsub`, we must apply the patch twice, to replace both occurences of `Rubocop` with `RuboCop`.
The generated spec file intentionally has a failing spec in it, so gem authors write specs. If we are to use running specs as a way to check if the generator works, then we need to make that spec pass.
The smoke test was broken. Putting it in a workflow ensures we find out early if it happens again.
9cc584c
to
b400944
Compare
The smoke test was broken. This minimally fixes it, and adds a workflow to run it.