summaryrefslogtreecommitdiff
path: root/spec
AgeCommit message (Collapse)Author
2020-06-05Manually pick from rubygems/rubygems changes atHiroshi SHIBATA
https://github.com/rubygems/rubygems/pull/3666/commits/ca5bf584026c9fd3a288eb10c65493e9f01ccc44 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05Re-record all cassettesDavid Rodríguez
I had to pin `redis-namespace` in our spec to 1.6.0 because on ruby 2.3.0 the spec no longer resolved to that version, so the cached `.gem` file was missing there. Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05Fix `bin/rake spec:realworld:record`David Rodríguez
Previously it was failing and not recording. Also, the `BUNDLER_SPEC_FORCE_RECORD` environment variable was forcing every request to be recorded, including duplicated requests to the same endpoint. That meant the recorded `versions` file would be incorrect because it would contain the result of the last request, which would be `304 NOT MODIFIED`. So, to rerecord, delete cassettes and let them be recorded when needed. Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Remove multiline gem specifications correctlyCarsten Wirth
https://github.com/rubygems/rubygems/commit/8dca0ad56e Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix `bundle info` not indicating a gem which has been ↵DEVRAJ KUMAR
deleted, unlike `bundle show` Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net> https://github.com/rubygems/rubygems/commit/2851b40ffb Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Tag test framework hint specs and use out helperFrank Lam
https://github.com/rubygems/rubygems/commit/1db61b5b5e Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Add user hint specs for bundle gem --testFrank Lam
https://github.com/rubygems/rubygems/commit/1d2292a88f Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix bundle gem ignoring global gem.test configFrank Lam
* bundle gem previously ignored gem.test when passed empty -t flag, defaulting to RSpec * bundle gem will now ask user for test framework when passed empty -t flag and gem.test is set to false, but will not overwrite gem.test * thor option parsing for String types falls back to human name for nil, so setting lazy_default to nil won't work * https://github.com/erikhuda/thor/blob/c5161501e0cfac7a8c5b838a9c6084c275f03c0d/lib/thor/parser/options.rb#L224 Default to Bundler.settings["gem.test"] for empty --test Add shared examples for test framework to newgem spec Add examples for empty --test flag to newgem spec Simplify conditional for prompting test framework Follow naming conventions for bundler settings Add more descriptive test framework help text for bundle gem Update man pages for bundler https://github.com/rubygems/rubygems/commit/ab0785a09f Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Remove `forgotten_command_line_usages` from specsDavid Rodríguez
Instead, use the non-deprecated option except when specifically testing deprecated CLI flags. In that case, pass the flag directly and limit the specs to `bundler < 3`. https://github.com/rubygems/rubygems/commit/3d5e186241 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Reword specs to not mention deprecated flagsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/f878a81f22 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Rewrite dependency API specs to use new deployment modeDavid Rodríguez
Some of them were passing "by chance" because they used a `bundle install` command that failed, but the assertion was using the result of the previous. Others were skipped on bundler 3. Now they all pass in all versions. https://github.com/rubygems/rubygems/commit/cedf611e11 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Make `forgotten_command_line_options` always "forget" ↵David Rodríguez
options https://github.com/rubygems/rubygems/commit/4d39338670 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Improve specs testing option remembering behaviorDavid Rodríguez
By making them more explicit. https://github.com/rubygems/rubygems/commit/9979c5a811 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix `bundle install` unintentionally saving configurationDavid Rodríguez
Even if no explicit flags were passed to it. https://github.com/rubygems/rubygems/commit/0598cbb68c Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Change descriptions to not mention deprecated flagsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/731b3783f1 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Fix flag name in spec descriptionsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/6395392b83 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Improve wording of some specsDavid Rodríguez
https://github.com/rubygems/rubygems/commit/3372b21553 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Remove old no longer meaningful specDavid Rodríguez
This spec was originally written many years ago to verity gems were properly "remembered" in the lock file. At this point, the test feels a bit dummy since the first `bundle install` already runs on a "clean machine". https://github.com/rubygems/rubygems/commit/dbfefb3f5a Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Revert multi ruby{,gems} version requirement fixDavid Rodríguez
This reverts commit 20f06d9e178211a3016133852b72d21ac7bb93ad, reversing changes made to f2b30cb70df8a518bef0e8a64bbceb86234d922d. https://github.com/rubygems/rubygems/commit/40802bdb18 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Support running specs against a tarballDavid Rodríguez
When bundler specs are run from a ruby tarball (ruby-core does this), there's no git folder, so `git ls-files` fails. Support this case by making specs rely on the list of files from the bundler gemspec instead, and invert the spec that makes sure we ship the right set of files. As per the other quality specs, skip them in this case. https://github.com/rubygems/rubygems/commit/b28d5ec931 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Remove unintended extra spaceDavid Rodríguez
https://github.com/rubygems/rubygems/commit/1cc02930f3 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05Revert "Fix a error in a `before(:suite)` hook"Hiroshi SHIBATA
This reverts commit 67d2a715ca35090fbb3ab13df5b7348b1807dd47. Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05Revert "Fix a failure in bundle version with version outputs the version ↵Hiroshi SHIBATA
with build metadata" This reverts commit fcc8be0198a16cc5fa7d4827be0c781209b70f98. Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Deprecate the `--no-deployment` flagDavid Rodríguez
And never recommend it inside CLI messages. This flag represents the default behaviour of `bundle install`, and the only reason it exists is to "override" previous `--deployment` flag usages which were silently remembered. So it should be deprecated just like all the other flags the rely on remembering their values across invocations. https://github.com/rubygems/rubygems/commit/40e50b7190 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Pass `--deployment` flag directlyDavid Rodríguez
This spec is run only in bundler 2 mode, and it's testing the `--deployment` flag specifically. https://github.com/rubygems/rubygems/commit/a5d91c68b6 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-05[rubygems/rubygems] Unskip "monorepo issues"David Rodríguez
They seem to be passing? https://github.com/rubygems/rubygems/commit/a00d1e6896 Notes: Merged: https://github.com/ruby/ruby/pull/3184
2020-06-03Ensure origins for all included, prepended, and refined modulesJeremy Evans
This fixes various issues when a module is included in or prepended to a module or class, and then refined, or refined and then included or prepended to a module or class. Implement by renaming ensure_origin to rb_ensure_origin, making it non-static, and calling it when refining a module. Fix Module#initialize_copy to handle origins correctly. Previously, Module#initialize_copy did not handle origins correctly. For example, this code: ```ruby module B; end class A def b; 2 end prepend B end a = A.dup.new class A def b; 1 end end p a.b ``` Printed 1 instead of 2. This is because the super chain for a.singleton_class was: ``` a.singleton_class A.dup B(iclass) B(iclass origin) A(origin) # not A.dup(origin) ``` The B iclasses would not be modified, so the includer entry would be still be set to A and not A.dup. This modifies things so that if the class/module has an origin, all iclasses between the class/module and the origin are duplicated and have the correct includer entry set, and the correct origin is created. This requires other changes to make sure all tests still pass: * rb_undef_methods_from doesn't automatically handle classes with origins, so pass it the origin for Comparable when undefing methods in Complex. This fixed a failure in the Complex tests. * When adding a method, the method cache was not cleared correctly if klass has an origin. Clear the method cache for the klass before switching to the origin of klass. This fixed failures in the autoload tests related to overridding require, without breaking the optimization tests. Also clear the method cache for both the module and origin when removing a method. * Module#include? is fixed to skip origin iclasses. * Refinements are fixed to use the origin class of the module that has an origin. * RCLASS_REFINED_BY_ANY is removed as it was only used in a single place and is no longer needed. * Marshal#dump is fixed to skip iclass origins. * rb_method_entry_make is fixed to handled overridden optimized methods for modules that have origins. Fixes [Bug #16852] Notes: Merged: https://github.com/ruby/ruby/pull/3140
2020-06-03Quarantine specs which fail frequently with CHECK_LEAKS=trueBenoit Daloze
2020-06-02Add a spec for the new NoMethodError display of the receiverJean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/3176
2020-06-01Make sure rb_enc_str_new_static() is used when enc is NULLBenoit Daloze
* The definition of the rb_enc_str_new_cstr macro depends on HAVE_BUILTIN___BUILTIN_CONSTANT_P. * It SEGV on mswin otherwise.
2020-05-31Update to ruby/spec@4e486faBenoit Daloze
2020-05-31Update to ruby/mspec@e3abf6bBenoit Daloze
2020-05-31Fix error raised by Net::HTTPResponse#inflater if the block raisesBenoit Daloze
* See https://bugs.ruby-lang.org/issues/13882#note-6 Notes: Merged: https://github.com/ruby/ruby/pull/3164
2020-05-31Fix spec description for Net::HTTP.getBenoit Daloze
Notes: Merged: https://github.com/ruby/ruby/pull/3164
2020-05-30spec: add wsl guardYusuke Endoh
WSL 2 is officially released. It uses Linux kernel, so almost all specs for Linux work on WSL, except one: gethostbyaddr. I guess network resolution in WSL is based on Windows, so the behavior seems a bit different from normal Linux. This change adds `platform_is_not :wsl` guard, and guards out the test in question.
2020-05-26Use receiver #name rather than #inspect to build NameError messageJean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/3080
2020-05-25Fix failures in ./spec/bundler/quality_spec.rbKazuhiro NISHIYAMA
``` Failures: 1) The library itself does not contain any warnings Failure/Error: raise "Invoking #{method}!(#{args.map(&:inspect).join(", ")}) failed:\n#{last_command.stdboth}" RuntimeError: Invoking sys_exec!("ruby -w") failed: /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError) from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>' from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require' from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require' from -:2:in `<main>' Commands: $ ruby -w /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError) from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>' from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require' from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require' from -:2:in `<main>' # $? => 1 ```
2020-05-25Fix a failure in bundle version with version outputs the version with build ↵Kazuhiro NISHIYAMA
metadata ``` 1) bundle version with version outputs the version with build metadata Failure/Error: expect(out).to match(/\ABundler version #{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit #{COMMIT_HASH}\)\z/) expected "Bundler version 2.2.0.dev (2020-05-25 commit )" to match /\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/ Diff: @@ -1,2 +1,2 @@ -/\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/ +"Bundler version 2.2.0.dev (2020-05-25 commit )" Commands: $ /home/user/snapshot-master/ruby -I/home/user/snapshot-master/spec/bundler -r/home/user/snapshot-master/spec/bundler/support/artifice/fail.rb -r/home/user/snapshot-master/spec/bundler/support/hax.rb /home/user/snapshot-master/tmp/1/gems/system/bin/bundle version Bundler version 2.2.0.dev (2020-05-25 commit ) # $? => 0 ```
2020-05-25Fix a error in a `before(:suite)` hookKazuhiro NISHIYAMA
https://github.com/ruby/actions/runs/703745101?check_suite_focus=true#step:16:27 ``` An error occurred in a `before(:suite)` hook. Failure/Error: contents = File.read(version_file) Errno::ENOENT: No such file or directory @ rb_sysopen - /home/runner/work/actions/actions/snapshot-master/tmp/1/bundler-2.2.0.dev/lib/bundler/version.rb ```
2020-05-22Fixup 1d079a0c5d4d80860a4d6d692344124fe5c562b5Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Sync Bundler PR #3624 with HEAD commitsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Revert 1f011cccb16ca9e8ee378cb5a9d4c14459afd68cHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Marked the failing examples with the current master branch on ruby repositoryHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-22Sync Bundler PR #3624Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3114
2020-05-19Skip some tests if extracted from tarball (again)Kazuhiro NISHIYAMA
Fix up previous commit ref 9aa75795f9f438d5c874d8e418c3c7cdd63024fa, 38002a8adbd98266426940d829429a30af0622a4, and 0e60b59d5884edb8f9aea023efd9b24f1ff02049
2020-05-18Skip some tests if extracted from tarball (again)Kazuhiro NISHIYAMA
ref 9aa75795f9f438d5c874d8e418c3c7cdd63024fa
2020-05-14Thread scheduler for light weight concurrency.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3032 Merged-By: ioquatix <samuel@codeotaku.com>
2020-05-14clean-up .bundle directory in bundled_appHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3105
2020-05-14Use the gemspec in build_dir directlyHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3105
2020-05-13Skip the examples for bundle exec with gem installationHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3086