Skip to content

Commit

Permalink
Fix minitest aruba setup
Browse files Browse the repository at this point in the history
This makes the minitest initializer create a dummy test so
- the test code gets exercised on the first run
- minitest will output the number of tests run in version 5.22 (see
  minitest/minitest#986)

It also fixes the setup code which was now finally tested and found
failing.
  • Loading branch information
mvz committed Apr 1, 2024
1 parent f63d5aa commit 56795fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Feature: Initialize project with aruba
When I successfully run `ruby -Ilib:test test/use_aruba_with_minitest.rb`
Then the output should contain:
"""
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
1 runs, 0 assertions, 0 failures, 0 errors, 1 skips
"""

Scenario: Unknown Test Framework
Expand Down
6 changes: 5 additions & 1 deletion lib/aruba/initializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ class FirstRun < Minitest::Test
include Aruba::Api
def setup
aruba_setup
setup_aruba
end
def test_dummy
skip "Add some real tests here"
end
end
EOS
Expand Down

0 comments on commit 56795fb

Please sign in to comment.