Skip to content

Commit

Permalink
Added simple test script
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 16, 2023
1 parent 83bdf12 commit ad2a38d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
20 changes: 1 addition & 19 deletions tool/test_for_warn_bundled_gems/README.md
@@ -1,21 +1,3 @@
This directory contains tests for the bundled gems warning under the Bundler.

## Warning cases

test_warn_bundled_gems.rb:
test_warn_dependency.rb:
test_warn_dash_gem.rb:
$ ruby test_warn_dash_gem.rb

test_warn_bundle_exec.rb:
$ bundle exec ruby test_warn_bundle_exec.rb

test_warn_bundle_exec_shebang.rb:
$ bundle exec ./test_warn_bundle_exec_shebang.rb

## Not warning cases

test_no_warn_dash_gem.rb:
test_no_warn_bootsnap.rb:
test_no_warn_dependency.rb:
$ ruby test_no_warn_dash_gem.rb
see [test.sh](./test.sh) for details.
31 changes: 31 additions & 0 deletions tool/test_for_warn_bundled_gems/test.sh
@@ -0,0 +1,31 @@
#!/bin/bash

echo "* Show warning require and LoadError"
ruby test_warn_bundled_gems.rb

echo "* Show warning when bundled gems called as dependency"
ruby test_warn_dependency.rb

echo "* Show warning sub-feature like bigdecimal/util"
ruby test_warn_sub_feature.rb

echo "* Show warning dash gem like net/smtp"
ruby test_warn_dash_gem.rb

echo "* Show warning when bundle exec with ruby and script"
bundle exec ruby test_warn_bundle_exec.rb

echo "* Show warning when bundle exec with shebang's script"
bundle exec ./test_warn_bundle_exec_shebang.rb

echo "* Don't show warning bundled gems on Gemfile"
ruby test_no_warn_dependency.rb

echo "* Don't show warning with bootsnap"
ruby test_no_warn_bootsnap.rb

echo "* Don't show warning with net/smtp when net-smtp on Gemfile"
ruby test_no_warn_dash_gem.rb

echo "* Don't show warning bigdecimal/util when bigdecimal on Gemfile"
ruby test_no_warn_sub_feature.rb

0 comments on commit ad2a38d

Please sign in to comment.