-
Notifications
You must be signed in to change notification settings - Fork 130
Detect unloaded files under lib directory #506
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
Conversation
@@ -34,7 +34,7 @@ jobs: | |||
- run: gem install bundler | |||
- run: bundle install | |||
- run: bundle exec rubocop | |||
- run: bundle exec rspec | |||
- run: rake 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.
maintainer: please don't call bundle exec rspec
. It fails even in your local after merging this change.
- run: bundle exec yard stats ./lib/line/bot/v2 --fail-on-warning | ||
- run: bundle exec rbs collection install | ||
- run: bundle exec rbs -I sig validate |
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.
I'll move this into Rakefile later. I want to put bundle exec rake ci
here finally
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.
-> #511
584167b
to
3a780c7
Compare
|
||
desc "Run normal tests (exclude no_missing_require_* specs)" | ||
task :test_normal do | ||
sh "bundle exec rspec --exclude-pattern 'spec/line/bot/line_bot_api_gem_spec.rb,spec/line/bot/line_bot_gem_spec.rb'" |
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.
--exclude-pattern
allows multiple target when we use comma like --exclude-pattern 'A,B,C'
, though --exclude-pattern 'A' --exclude-pattern 'B'
doesn't work.
This change adds specs to detect files that are not required yet by
required line-bot-api
orrequire line/bot
. However, since RSpec runs tests in the same process, it heavily depends on the order of test execution. Additionally, afterrequire line-bot-api
, we cannot clean up and then cannot callrequire line/bot
.Therefore, this change makes sure that important tests are run in a separate process. To avoid having to manually enter commands locally with test separation in mind, this change describes all the tests in the Rakefile's test task to hide the details of test execution.