aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Refined ioctl error descriptionNobuyoshi Nakada2020-06-111-2/+2
|
* Make proc/Proc.new without block an error instead of warningJeremy Evans2020-06-102-2/+2
| | | | The warning for these was added in 2.7.
* ENV.delete should return the result of block on non-existing keyNobuyoshi Nakada2020-06-101-0/+7
| | | | | | | Fixes [Bug #16173] Co-Authored-By: Burdette Lamar <burdettelamar@yahoo.com> Co-Authored-By: Jeremy Evans <code@jeremyevans.net>
* Fix build failuresYuki Nishijima2020-06-061-2/+2
|
* Manually pick from rubygems/rubygems changes atHiroshi SHIBATA2020-06-051-44/+56
| | | | https://github.com/rubygems/rubygems/pull/3666/commits/ca5bf584026c9fd3a288eb10c65493e9f01ccc44
* Re-record all cassettesDavid Rodríguez2020-06-051-0/+1
| | | | | | 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.
* Fix `bin/rake spec:realworld:record`David Rodríguez2020-06-051-1/+0
| | | | | | | | | | | 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.
* [rubygems/rubygems] Remove multiline gem specifications correctlyCarsten Wirth2020-06-051-0/+24
| | | | https://github.com/rubygems/rubygems/commit/8dca0ad56e
* [rubygems/rubygems] Fix `bundle info` not indicating a gem which has been ↵DEVRAJ KUMAR2020-06-051-0/+9
| | | | | | | | deleted, unlike `bundle show` Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net> https://github.com/rubygems/rubygems/commit/2851b40ffb
* [rubygems/rubygems] Tag test framework hint specs and use out helperFrank Lam2020-06-051-8/+11
| | | | https://github.com/rubygems/rubygems/commit/1db61b5b5e
* [rubygems/rubygems] Add user hint specs for bundle gem --testFrank Lam2020-06-051-2/+22
| | | | https://github.com/rubygems/rubygems/commit/1d2292a88f
* [rubygems/rubygems] Fix bundle gem ignoring global gem.test configFrank Lam2020-06-051-12/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* [rubygems/rubygems] Remove `forgotten_command_line_usages` from specsDavid Rodríguez2020-06-0523-103/+182
| | | | | | | | 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
* [rubygems/rubygems] Reword specs to not mention deprecated flagsDavid Rodríguez2020-06-058-33/+19
| | | | https://github.com/rubygems/rubygems/commit/f878a81f22
* [rubygems/rubygems] Rewrite dependency API specs to use new deployment modeDavid Rodríguez2020-06-052-13/+16
| | | | | | | | | 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
* [rubygems/rubygems] Make `forgotten_command_line_options` always "forget" ↵David Rodríguez2020-06-051-2/+0
| | | | | | options https://github.com/rubygems/rubygems/commit/4d39338670
* [rubygems/rubygems] Improve specs testing option remembering behaviorDavid Rodríguez2020-06-052-5/+5
| | | | | | By making them more explicit. https://github.com/rubygems/rubygems/commit/9979c5a811
* [rubygems/rubygems] Fix `bundle install` unintentionally saving configurationDavid Rodríguez2020-06-051-0/+9
| | | | | | Even if no explicit flags were passed to it. https://github.com/rubygems/rubygems/commit/0598cbb68c
* [rubygems/rubygems] Change descriptions to not mention deprecated flagsDavid Rodríguez2020-06-051-2/+2
| | | | https://github.com/rubygems/rubygems/commit/731b3783f1
* [rubygems/rubygems] Fix flag name in spec descriptionsDavid Rodríguez2020-06-051-2/+2
| | | | https://github.com/rubygems/rubygems/commit/6395392b83
* [rubygems/rubygems] Improve wording of some specsDavid Rodríguez2020-06-051-7/+7
| | | | https://github.com/rubygems/rubygems/commit/3372b21553
* [rubygems/rubygems] Remove old no longer meaningful specDavid Rodríguez2020-06-051-10/+0
| | | | | | | | | 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
* [rubygems/rubygems] Revert multi ruby{,gems} version requirement fixDavid Rodríguez2020-06-051-174/+0
| | | | | | | This reverts commit 20f06d9e178211a3016133852b72d21ac7bb93ad, reversing changes made to f2b30cb70df8a518bef0e8a64bbceb86234d922d. https://github.com/rubygems/rubygems/commit/40802bdb18
* [rubygems/rubygems] Support running specs against a tarballDavid Rodríguez2020-06-053-8/+18
| | | | | | | | | | | | | 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
* [rubygems/rubygems] Remove unintended extra spaceDavid Rodríguez2020-06-051-1/+1
| | | | https://github.com/rubygems/rubygems/commit/1cc02930f3
* Revert "Fix a error in a `before(:suite)` hook"Hiroshi SHIBATA2020-06-051-18/+0
| | | | This reverts commit 67d2a715ca35090fbb3ab13df5b7348b1807dd47.
* Revert "Fix a failure in bundle version with version outputs the version ↵Hiroshi SHIBATA2020-06-051-2/+1
| | | | | | with build metadata" This reverts commit fcc8be0198a16cc5fa7d4827be0c781209b70f98.
* [rubygems/rubygems] Deprecate the `--no-deployment` flagDavid Rodríguez2020-06-051-0/+1
| | | | | | | | | | | | 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
* [rubygems/rubygems] Pass `--deployment` flag directlyDavid Rodríguez2020-06-051-1/+1
| | | | | | | This spec is run only in bundler 2 mode, and it's testing the `--deployment` flag specifically. https://github.com/rubygems/rubygems/commit/a5d91c68b6
* [rubygems/rubygems] Unskip "monorepo issues"David Rodríguez2020-06-052-10/+0
| | | | | | They seem to be passing? https://github.com/rubygems/rubygems/commit/a00d1e6896
* Ensure origins for all included, prepended, and refined modulesJeremy Evans2020-06-031-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Quarantine specs which fail frequently with CHECK_LEAKS=trueBenoit Daloze2020-06-031-0/+2
|
* Add a spec for the new NoMethodError display of the receiverJean Boussier2020-06-021-0/+18
|
* Make sure rb_enc_str_new_static() is used when enc is NULLBenoit Daloze2020-06-011-2/+7
| | | | | | * The definition of the rb_enc_str_new_cstr macro depends on HAVE_BUILTIN___BUILTIN_CONSTANT_P. * It SEGV on mswin otherwise.
* Update to ruby/spec@4e486faBenoit Daloze2020-05-3146-99/+634
|
* Update to ruby/mspec@e3abf6bBenoit Daloze2020-05-318-38/+97
|
* Fix error raised by Net::HTTPResponse#inflater if the block raisesBenoit Daloze2020-05-311-0/+67
| | | | * See https://bugs.ruby-lang.org/issues/13882#note-6
* Fix spec description for Net::HTTP.getBenoit Daloze2020-05-311-1/+1
|
* spec: add wsl guardYusuke Endoh2020-05-302-2/+13
| | | | | | | | | | 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.
* Use receiver #name rather than #inspect to build NameError messageJean Boussier2020-05-261-0/+30
|
* Fix failures in ./spec/bundler/quality_spec.rbKazuhiro NISHIYAMA2020-05-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | ``` 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 ```
* Fix a failure in bundle version with version outputs the version with build ↵Kazuhiro NISHIYAMA2020-05-251-1/+2
| | | | | | | | | | | | | | | | | | | | 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 ```
* Fix a error in a `before(:suite)` hookKazuhiro NISHIYAMA2020-05-251-0/+18
| | | | | | | | | | | 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 ```
* Fixup 1d079a0c5d4d80860a4d6d692344124fe5c562b5Hiroshi SHIBATA2020-05-223-5/+5
|
* Sync Bundler PR #3624 with HEAD commitsHiroshi SHIBATA2020-05-224-25/+60
|
* Revert 1f011cccb16ca9e8ee378cb5a9d4c14459afd68cHiroshi SHIBATA2020-05-221-1/+0
|
* Marked the failing examples with the current master branch on ruby repositoryHiroshi SHIBATA2020-05-2214-29/+29
|
* Sync Bundler PR #3624Hiroshi SHIBATA2020-05-2247-348/+444
|
* Skip some tests if extracted from tarball (again)Kazuhiro NISHIYAMA2020-05-191-0/+6
| | | | | | | | | Fix up previous commit ref 9aa75795f9f438d5c874d8e418c3c7cdd63024fa, 38002a8adbd98266426940d829429a30af0622a4, and 0e60b59d5884edb8f9aea023efd9b24f1ff02049
* Skip some tests if extracted from tarball (again)Kazuhiro NISHIYAMA2020-05-181-0/+4
| | | | ref 9aa75795f9f438d5c874d8e418c3c7cdd63024fa