4 test failures when packaging for GNU Guix
Hello!
I tried packaging this for GNU Guix, but I'm seeing 4 test failures when running the test suites:
phase `build' succeeded after 0.1 seconds
starting phase `check'
Bake::Base
has a path
formats nicely
Bake::Command::Call
can invoke task
with arguments
can invoke task
with mixed arguments
can invoke task
with = options
can invoke task
with -- options
can invoke task
with test_argument_normalized
can accept --foo_bar
can accept --foo-bar
with value generating task
with json output format
can print the value (FAILED - 1)
with raw output format
can print the value (FAILED - 2)
with pp output format
can print the value (FAILED - 3)
with yaml output format
can print the value (FAILED - 4)
Bake::Command::List
can list tasks
with pattern
lists only matching tasks
Bake::Context
can invoke root task
#invoke
can invoke another task
can invoke task with required argument
#lookup
can lookup method on parent instance
can lookup method on child instance
can lookup method on sibling instance
Bake::Types::Boolean
true
should be a kind of TrueClass
should be == true
false
should be a kind of FalseClass
should be == false
Bake::Types::Input
-
should be a kind of IO
should be == #<IO:0x000000000046f910>
/tmp/guix-build-ruby-bake-0.18.2.drv-0/source/spec/bake/types/input.txt
should be a kind of IO
Bake::Types::Nil
nil
should be a kind of NilClass
should be ==
null
should be a kind of NilClass
should be ==
Bake::Types::Output
-
should be a kind of IO
should be == #<IO:0x000000000046f870>
/tmp/guix-build-ruby-bake-0.18.2.drv-0/source/spec/bake/types/output.txt
should be a kind of IO
Bake::Types
can use | operator
Array(Any)
should be a kind of Bake::Types::Array
Bake::Context
should parse integer
should parse an array of integers
should parse a symbol and a hash
should parse a JSON string
should parse a URI string
Bake
has a version number
Failures:
1) Bake::Command::Call with value generating task with json output format can print the value
Failure/Error: raise ArgumentError, "Could not find recipe for #{command}!"
ArgumentError:
Could not find recipe for output!
# ./lib/bake/context.rb:124:in `call'
# ./lib/bake/command/call.rb:50:in `call'
# ./spec/bake/command/call_spec.rb:83:in `block (5 levels) in <top (required)>'
# ./spec/bake/command/call_spec.rb:83:in `block (4 levels) in <top (required)>'
2) Bake::Command::Call with value generating task with raw output format can print the value
Failure/Error: raise ArgumentError, "Could not find recipe for #{command}!"
ArgumentError:
Could not find recipe for output!
# ./lib/bake/context.rb:124:in `call'
# ./lib/bake/command/call.rb:50:in `call'
# ./spec/bake/command/call_spec.rb:95:in `block (5 levels) in <top (required)>'
# ./spec/bake/command/call_spec.rb:95:in `block (4 levels) in <top (required)>'
3) Bake::Command::Call with value generating task with pp output format can print the value
Failure/Error: raise ArgumentError, "Could not find recipe for #{command}!"
ArgumentError:
Could not find recipe for output!
# ./lib/bake/context.rb:124:in `call'
# ./lib/bake/command/call.rb:50:in `call'
# ./spec/bake/command/call_spec.rb:101:in `block (5 levels) in <top (required)>'
# ./spec/bake/command/call_spec.rb:101:in `block (4 levels) in <top (required)>'
4) Bake::Command::Call with value generating task with yaml output format can print the value
Failure/Error: raise ArgumentError, "Could not find recipe for #{command}!"
ArgumentError:
Could not find recipe for output!
# ./lib/bake/context.rb:124:in `call'
# ./lib/bake/command/call.rb:50:in `call'
# ./spec/bake/command/call_spec.rb:107:in `block (5 levels) in <top (required)>'
# ./spec/bake/command/call_spec.rb:107:in `block (4 levels) in <top (required)>'
Finished in 0.01823 seconds (files took 0.09528 seconds to load)
43 examples, 4 failures
Failed examples:
rspec ./spec/bake/command/call_spec.rb:82 # Bake::Command::Call with value generating task with json output format can print the value
rspec ./spec/bake/command/call_spec.rb:94 # Bake::Command::Call with value generating task with raw output format can print the value
rspec ./spec/bake/command/call_spec.rb:100 # Bake::Command::Call with value generating task with pp output format can print the value
rspec ./spec/bake/command/call_spec.rb:106 # Bake::Command::Call with value generating task with yaml output format can print the value
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "rspec" arguments: () exit-status: 1 term-signal: #f stop-signal: #f>
phase `check' failed after 0.2 seconds
Would you happen to know what they may be caused by? If I ignore them, they reappear when using bake test in other projects (Could not find recipe for X).
I'm on Ruby 2.7.4 with the following direct dependencies: [email protected] [email protected] [email protected]
Are you including the "system" files in https://github.com/ioquatix/bake/tree/main/bake?
Hello, and thanksfor the reply! I believe so, per the bake.gemspec file.
I've found that if I use 'bundle exec' to run rspec, the 4 test failures disappear. Why could that be?
I wasn't using bundler because of the circular dependencies added to the gems.rb file. The maintenance block appears to be marked as optional, but bundler insists, it seems.
Any tip to get bundler setup to be happy even without the gems.rb dependencies?
Thanks!
OK, I got bundler to run by removing the bake-modernize, bake-gem, bake-github-pages and utopia-project requirements from the gems.rb file.
Still, it seems something is wrong with the installation as when invoking bake test to run the test suite of thesus gem, it fails like earlier:
starting phase `build'
Successfully built RubyGem
Name: sus
Version: 0.16.0
File: sus-0.16.0.gem
phase `build' succeeded after 0.1 seconds
starting phase `check'
{"time":"2023-01-10T01:57:30+00:00","severity":"error","class":"Module","oid":180,"pid":32,"subject":"Bake::Command","message":"Could not find recipe for test!","error":{"kind":"ArgumentError","message":"Could not find recipe for test!","stack":"/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/context.rb:124:in `call'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/command/call.rb:50:in `call'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/command/top.rb:78:in `call'\n/gnu/store/z0lbnb0hs3zqz8gs62ip0x4w0c6bjm42-ruby-samovar-2.1.4/lib/ruby/vendor_ruby/gems/samovar-2.1.4/lib/samovar/command.rb:36:in `call'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/command.rb:29:in `call'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/bin/bake:29:in `<top (required)>'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/bin/.real/bake:23:in `load'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/bin/.real/bake:23:in `<top (required)>'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/bin/bake:4:in `load'\n/gnu/store/cnkw4l0nsmzb37qmlfsikp7w4n1k2zwx-ruby-bake-0.18.2/bin/bake:4:in `<main>'\n"}}
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "bake" arguments: ("test") exit-status: 1 term-signal: #f stop-signal: #f>
phase `check' failed after 0.1 seconds
command "bake" "test" failed with status 1
Bake depends heavily on gem load paths being set correctly, since it looks through gems for the paths. You can see this in action by writing CONSOLE_LEVEL=debug before running bake list or any of the test commands.
"Cannot find recipe for test" sounds like you are running bake test without installing the bake-test gem. This gem is a shim which detects which test framework is in use and runs it according to a standard set of rules. It means you don't need to know what test framework a library is using which is useful for running external test suites.
Since bake itself is currently using rspec, you can just run rspec directly, but in the future I'll probably migrate the test suite to sus... which is why using bake test is a good idea.
The bake-test gem should be available in GEM_PATH, since it's listed as an input in the Guix package definition of ruby-sus:
(define-public ruby-sus
(package
(name "ruby-sus")
(version "0.16.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "sus" version))
(sha256
(base32
"0msdd527wyiviwnizw7f0yyhbi0kv4wxd7xvw5gymq8knm9v0ssb"))))
(build-system ruby-build-system)
(arguments
(list #:phases #~(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "CONSOLE_LEVEL" "debug")
(invoke "bake" "test")))))))
(native-inputs (list ruby-bake-test ruby-bake-test-external ruby-covered))
(synopsis "Fast and scalable test runner for Ruby")
(description "This package provides a fast and scalable test runner for Ruby.")
(home-page "https://github.com/ioquatix/sus")
(license license:expat)))
The check phase printed the following:
starting phase `build'
Successfully built RubyGem
Name: sus
Version: 0.16.0
File: sus-0.16.0.gem
phase `build' succeeded after 0.1 seconds
starting phase `check'
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem did_you_mean: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/did_you_mean-1.4.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem mapping: /gnu/store/0r54ijhg51x0922w2x3aw2lbwlv9ksfm-ruby-mapping-1.1.1/lib/ruby/vendor_ruby/gems/mapping-1.1.1..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem fiber-local: /gnu/store/z6kwx3n5hp1qb2sffz2js7lap740sakr-ruby-fiber-local-1.0.0/lib/ruby/vendor_ruby/gems/fiber-local-1.0.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem console: /gnu/store/g2ncwnfafdmiw8rpv3zn2f2jj1ivl2kj-ruby-console-1.16.2/lib/ruby/vendor_ruby/gems/console-1.16.2..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Adding \"/gnu/store/g2ncwnfafdmiw8rpv3zn2f2jj1ivl2kj-ruby-console-1.16.2/lib/ruby/vendor_ruby/gems/console-1.16.2/bake\""}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem samovar: /gnu/store/z0lbnb0hs3zqz8gs62ip0x4w0c6bjm42-ruby-samovar-2.1.4/lib/ruby/vendor_ruby/gems/samovar-2.1.4..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem bake: /gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Adding \"/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/bake\""}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem uri: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/uri-0.10.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem bundler: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.1.4..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem stringio: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/stringio-0.1.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem io-console: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/io-console-0.5.6..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem json: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/json-2.3.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem ostruct: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/ostruct-0.2.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem date: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/date-3.0.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"debug","class":"Bake::Loaders","oid":180,"pid":32,"subject":"#<Bake::Loaders:0x00000000009c1918>","message":"Checking gem bigdecimal: /gnu/store/j4z07lyi1ykk8bc68h1p4bpj1il9dn3f-ruby-2.7.4/lib/ruby/gems/2.7.0/gems/bigdecimal-2.0.0..."}
{"time":"2023-01-10T02:55:53+00:00","severity":"error","class":"Module","oid":200,"pid":32,"subject":"Bake::Command","message":"Could not find recipe for test!","error":{"kind":"ArgumentError","message":"Could not find recipe for test!","stack":"/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/context.rb:124:in `call'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/command/call.rb:50:in `call'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/command/top.rb:78:in `call'\n/gnu/store/z0lbnb0hs3zqz8gs62ip0x4w0c6bjm42-ruby-samovar-2.1.4/lib/ruby/vendor_ruby/gems/samovar-2.1.4/lib/samovar/command.rb:36:in `call'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/lib/bake/command.rb:29:in `call'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2/bin/bake:29:in `<top (required)>'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/bin/.real/bake:23:in `load'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/bin/.real/bake:23:in `<top (required)>'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/bin/bake:4:in `load'\n/gnu/store/r27jxglpg92d7b300al7g3vimmrsiy9m-ruby-bake-0.18.2/bin/bake:4:in `<main>'\n"}}
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "bake" arguments: ("test") exit-status: 1 term-signal: #f stop-signal: #f>
phase `check' failed after 0.1 seconds
command "bake" "test" failed with status 1
I'll review the paths now. Thanks for the help!
I don't see bake-test listed in the search paths. So, this would be why bake test is failing. For some reason, it's not being pulled in.
That's odd; from an environment setup with:
$ guix shell ruby ruby-bake ruby-bake-test ruby-pry
[env]$ echo $GEM_PATH
/gnu/store/55d17bxshp2h75w9yccw7h4h60d3igay-profile/lib/ruby/vendor_ruby
[env]$ ruby -e 'require "bake/test"' && echo ok
ok
$ ll /gnu/store/55d17bxshp2h75w9yccw7h4h60d3igay-profile/lib/ruby/vendor_ruby/gems/
total 36
lrwxrwxrwx 1 root root 98 Dec 31 1969 bake-0.18.2 -> /gnu/store/zby4m5dps0sf5dwf7l5nq0wd2z6rifg5-ruby-bake-0.18.2/lib/ruby/vendor_ruby/gems/bake-0.18.2
lrwxrwxrwx 1 root root 106 Dec 31 1969 bake-test-0.2.0 -> /gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0
lrwxrwxrwx 1 root root 102 Dec 31 1969 coderay-1.1.2 -> /gnu/store/c4ilmmbhl0qlryc665ygr8wj8ifplkl0-ruby-coderay-1.1.2/lib/ruby/vendor_ruby/gems/coderay-1.1.2
lrwxrwxrwx 1 root root 104 Dec 31 1969 console-1.16.2 -> /gnu/store/g2ncwnfafdmiw8rpv3zn2f2jj1ivl2kj-ruby-console-1.16.2/lib/ruby/vendor_ruby/gems/console-1.16.2
lrwxrwxrwx 1 root root 110 Dec 31 1969 fiber-local-1.0.0 -> /gnu/store/z6kwx3n5hp1qb2sffz2js7lap740sakr-ruby-fiber-local-1.0.0/lib/ruby/vendor_ruby/gems/fiber-local-1.0.0
lrwxrwxrwx 1 root root 102 Dec 31 1969 mapping-1.1.1 -> /gnu/store/0r54ijhg51x0922w2x3aw2lbwlv9ksfm-ruby-mapping-1.1.1/lib/ruby/vendor_ruby/gems/mapping-1.1.1
lrwxrwxrwx 1 root root 114 Dec 31 1969 method_source-1.0.0 -> /gnu/store/fnvkxybkf8lb8nbwk816sncnhlkxr0ln-ruby-method-source-1.0.0/lib/ruby/vendor_ruby/gems/method_source-1.0.0
lrwxrwxrwx 1 root root 96 Dec 31 1969 pry-0.13.1 -> /gnu/store/9z1m0gc9rmlfhzzj780lbi40rb3s13ps-ruby-pry-0.13.1/lib/ruby/vendor_ruby/gems/pry-0.13.1
lrwxrwxrwx 1 root root 102 Dec 31 1969 samovar-2.1.4 -> /gnu/store/z0lbnb0hs3zqz8gs62ip0x4w0c6bjm42-ruby-samovar-2.1.4/lib/ruby/vendor_ruby/gems/samovar-2.1.4
$ find /gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/build_info
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/cache
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/Runner
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/Runner/cdesc-Runner.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/Runner/minitest-c.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/Runner/rake-c.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/Runner/rspec-c.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/Runner/sus-c.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/cdesc-Test.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/detect-c.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/Test/exist%3f-c.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/Bake/cdesc-Bake.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/doc/bake-test-0.2.0/ri/cache.ri
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/extensions
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/bake
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/bake/test.rb
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/lib
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/lib/bake
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/lib/bake/test
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/lib/bake/test/detect.rb
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/lib/bake/test/runner.rb
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/lib/bake/test/version.rb
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/gems/bake-test-0.2.0/lib/bake/test.rb
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/specifications
/gnu/store/6rrzlmscx5l07ggh2cgfgk2ipa6cmw5j-ruby-bake-test-0.2.0/lib/ruby/vendor_ruby/specifications/bake-test-0.2.0.gemspec
Perhaps an assumption about how the files are layed out on the system is broken for the bake loader?
It seems the problem originates from https://github.com/ioquatix/bake/blob/main/lib/bake/loaders.rb#L102:
::Gem.loaded_specs.each do |name, spec|
The ::Gem.loaded_specs doesn't contain bake-test for some reason.
bake-test is not a direct dependency but is referenced in the gems.rb file, so I believe you need to use bundler to invoke the test suite. We could also try adding bake-test as a development dependency in the gemspec, perhaps that would mean you don't need to use bundler.
To be clear, from my findings so far, the issue seems not about bake-test missing from the environment (it's on my GEM_PATH and require 'bake/test' succeeds), but more relating to how GEMs are loaded and activated by Ruby when using GEM_PATH vs Bundler.