tendersearls / tldr

A Ruby test framework for people who don't have time for slow tests 💣💥
MIT License
250 stars 4 forks source link

Test Failure? #3

Closed coreyhaines closed 1 year ago

coreyhaines commented 1 year ago

I'm getting this when doing a rake test

¯\_(ツ)_/¯ 🐈 $rake test
Run options: --seed 61183

# Running:

.....................F

Failure:
DefaultReporterTest#test_parallel_output [/Users/coreyhaines/Projects/tldr/tests/default_reporter_test.rb:29]:
--- expected
+++ actual
@@ -1,10 +1,6 @@
-"Command: bundle exec tldr --seed 42
-" +
-"🌱 --seed 42
-" +
+"Command: tldr --seed 42
+" + "🌱 --seed 42
+" + "
+" + "🏃 Running:
+" + "
 "
-" +
-"🏃 Running:
-" +
-"
-"

rails test Users/coreyhaines/Projects/tldr/tests/default_reporter_test.rb:19

..............................................................................................................

Finished in 2.084595s, 63.3217 runs/s, 236.0171 assertions/s.
132 runs, 492 assertions, 1 failures, 0 errors, 0 skips
rake aborted!
Command failed with status (1)

Tasks: TOP => test
(See full trace by running task with --trace)
coreyhaines commented 1 year ago

Also interesting that the command in the output is rails test perhaps because I have rails installed in my global gemset?

coreyhaines commented 1 year ago

Just installed ruby 3.3.0-preview2, and I no longer get the rails test.... line in my output. BUT......I don't have any console colors anymore. :(

¯\_(ツ)_/¯ 🐈 $rake test
/Users/coreyhaines/.asdf/installs/ruby/3.3.0-preview2/lib/ruby/gems/3.3.0+0/gems/minitest-5.20.0/lib/minitest.rb:3: warning: mutex_m which will be not part of the default gems since Ruby 3.4.0
Run options: --seed 57951

# Running:

..................................................................................................................F.................

Finished in 1.892600s, 69.7453 runs/s, 259.9598 assertions/s.

  1) Failure:
DefaultReporterTest#test_parallel_output [/Users/coreyhaines/Projects/tldr/tests/default_reporter_test.rb:29]:
--- expected
+++ actual
@@ -1,10 +1,6 @@
-"Command: bundle exec tldr --seed 42
-" +
-"🌱 --seed 42
-" +
+"Command: tldr --seed 42
+" + "🌱 --seed 42
+" + "
+" + "🏃 Running:
+" + "
 "
-" +
-"🏃 Running:
-" +
-"
-"

132 runs, 492 assertions, 1 failures, 0 errors, 0 skips
rake aborted!
Command failed with status (1)

Tasks: TOP => test
(See full trace by running task with --trace)
searls commented 1 year ago

I think the reason for the failure is that you're invoking the test suite without bundle exec, but that assertion depends on Bundler being defined because it is expecting to see bundle exec tldr …. We could loosen up that assertion or you could just try again with bundle exec rake!

searls commented 1 year ago

Gonna close this now on the tenuous assumption that I was right ❤️