-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
'bundle exec rake' on a fresh clone gives a backtrace (cannot load 'test-unit') #43
Comments
A workaround is to add
with GNU sed (just plain gsed -i "/s.add_development_dependency 'aruba'/a\\
s.add_development_dependency 'test-unit', '~> 3'" mdless.gemspec If that's all it takes to satisfactorily fix this (without making anything worse), I'm happy to do a PR with just that change. |
mdless has no legit tests set up. The `test` folder just contains random
markdown snippets I use for manual testing.
…On 14 Jan 2020, at 17:35, Kevin Ernst wrote:
I'm using the built-in Ruby 2.3.x on macOS 10.14 (Mojave), with only
the `bundler` and `mdless` gems installed in my user directory.
I just want to run the tests for `mdless` without installing any gems
in my user or system `lib` directories. What I tried:
```bash
git clone https://github.com/ttscoff/mdless.git
bundle install --path vendor/bundle
bundle exec rake
```
…expecting the `test` target to run.
What I got instead was:
```
$ bundle exec rake
/Users/myuser/devel/util/mdless/test/test_helper.rb:1:in `require':
cannot load such file -- test/unit (LoadError)
from /Users/myuser/devel/util/mdless/test/test_helper.rb:1:in `<top
(required)>'
from /Users/myuser/devel/util/mdless/test/default_test.rb:1:in
`require'
from /Users/myuser/devel/util/mdless/test/default_test.rb:1:in `<top
(required)>'
from
/Users/myuser/devel/util/mdless/vendor/bundle/ruby/2.3.0/gems/rake-0.9.6/lib/rake/rake_test_loader.rb:15:in
`require'
from
/Users/myuser/devel/util/mdless/vendor/bundle/ruby/2.3.0/gems/rake-0.9.6/lib/rake/rake_test_loader.rb:15:in
`block in <main>'
from
/Users/myuser/devel/util/mdless/vendor/bundle/ruby/2.3.0/gems/rake-0.9.6/lib/rake/rake_test_loader.rb:4:in
`select'
from
/Users/myuser/devel/util/mdless/vendor/bundle/ruby/2.3.0/gems/rake-0.9.6/lib/rake/rake_test_loader.rb:4:in
`<main>'
rake aborted!
Command failed with status (1): [ruby -I"lib:test"
-I"/Users/myuser/devel/util/mdless/vendor/bundle/ruby/2.3.0/gems/rake-0.9.6/lib"
"/Users/myuser/devel/util/mdless/vendor/bundle/ruby/2.3.0/gems/rake-0.9.6/lib/rake/rake_test_loader.rb"
"test/default_test.rb" ]
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in
`load'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in
`kernel_load'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in
`run'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in
`exec'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in
`run'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in
`invoke_command'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in
`dispatch'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in
`dispatch'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in
`start'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in
`start'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/exe/bundle:46:in
`block in <top (required)>'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in
`with_friendly_errors'
/Users/myuser/.gem/ruby/2.3.0/gems/bundler-2.1.4/exe/bundle:34:in
`<top (required)>'
/Users/myuser/.gem/ruby/2.3.0/bin/bundle:22:in `load'
/Users/myuser/.gem/ruby/2.3.0/bin/bundle:22:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
```
I very obviously have the `test-unit` gem (3.1.5) available as a part
of the OS-default Ruby installation:
```
$ gem which test-unit
/Library/Ruby/Gems/2.3.0/gems/test-unit-3.1.5/lib/test-unit.rb
```
It's possible I just don't understand Ruby, bundler, or gems, because
I don't know why `bundle exec` wouldn't just use that one.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#43
|
If you're happy with your routine doing the manual tests, I respect that. But I'm certainly willing to take those, divide them up into automated tests (including one for #42), and submit a PR. I'll leave the original .md files untouched. Cucumber doesn't look so scary, and I could use some practice with Ruby. |
I am horrible at writing tests and would welcome any help, even if
you're just learning your way around. It will be a damn sight better
than I'll likely ever get to on this project.
…On 15 Jan 2020, at 8:47, Kevin Ernst wrote:
If you're happy with your routine doing the manual tests, I respect
that. But I'm certainly willing to take those, divide them up into
automated tests (including one for #42), and submit a PR. I'll leave
the original .md files untouched. Cucumber doesn't look so scary, and
I could use some practice with Ruby.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#43 (comment)
|
OK! |
I'm using the built-in Ruby 2.3.x on macOS 10.14 (Mojave), with only the
bundler
andmdless
gems installed in my user directory.I just want to run the tests for
mdless
without installing any gems in my user or systemlib
directories. What I tried:git clone https://github.com/ttscoff/mdless.git bundle install --path vendor/bundle bundle exec rake
…expecting the
test
target to run.What I got instead was a backtrace:
`require': cannot load such file -- test/unit
I very obviously have the
test-unit
gem (3.1.5) available as a part of the OS-default Ruby installation:It's possible I just don't understand Ruby, bundler, or gems, because I don't know why
bundle exec
wouldn't just use that one.The text was updated successfully, but these errors were encountered: