Skip to content
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 bundler related test for test-bundled-gems #778

Merged
merged 1 commit into from
Sep 5, 2021

Conversation

pocke
Copy link
Member

@pocke pocke commented Sep 5, 2021

This PR fixes bundler related tests fro test-bundled-gems.

The RBS's tests fail on ruby/ruby's CI. https://github.com/ruby/ruby/pull/4809/checks?check_run_id=3516979076

The following three tests fail

  • runtime test
    • rbs collection does require 'bundler' always, so if defined?(Bundler) is not appropriate solution to detect availability of bunder/setup.
  • cli test for collection
    • Bundler::LockfileParser needs Gemfile in the current directory to detect Bundler.root, but the CLI test doesn't put Gemfile.
    • The problem is concealed if the test runs on Bundler environment because it sets BUNDLE_GEMFILE env var.
  • test with strong_json
    • The test failed if strong_json gem is not available.
    • The problem is concealed on the Bundler environment because strong_json is installed with bundle install as a dependency of goodcheck gem.
    • I replaced strong_json with rbs-amber.

command_line = if defined?(Bundler)
[ruby, "-rbundler/setup", "-rrbs/test/setup", "sample.rb"]
else
command_line = if ENV['RUBY']
Copy link
Member

Choose a reason for hiding this comment

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

Seems like we can omit the ruby var, but it's up to you. (If you have another fix...)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, I removed the ruby var. 🚮

@@ -333,6 +333,7 @@ def test_collection_install

path: #{dir.join('gem_rbs_collection')}
YAML
dir.join('Gemfile').write('')
Copy link
Member

Choose a reason for hiding this comment

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

🤹

@pocke pocke force-pushed the Fix_bundler_related_test_for_test_bundled_gems branch from c79a4e7 to 1bf2784 Compare September 5, 2021 10:30
@pocke pocke force-pushed the Fix_bundler_related_test_for_test_bundled_gems branch from 1bf2784 to 5cebaf8 Compare September 5, 2021 10:35
@pocke pocke merged commit fc05bc2 into master Sep 5, 2021
@pocke pocke deleted the Fix_bundler_related_test_for_test_bundled_gems branch September 5, 2021 10:49
pocke added a commit to soutaro/ruby that referenced this pull request Sep 5, 2021
soutaro added a commit to ruby/ruby that referenced this pull request Sep 5, 2021
* Bundle RBS 1.6.0

* Specify bundled rbs commit hash to fix test

ref ruby/rbs#778

* Bundle RBS 1.6.1

Co-authored-by: Masataka Pocke Kuwabara <kuwabara@pocke.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants