Actions
Bug #19573
closedassert_match on CommandExpectation raises exception
Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Pull request:
Team Backlog:
Description
When HammerCLI::Testing::CommandAssertions are included into global namespace the method CommandExpectation#assert_match starts to collide with Minitest's assert_match.
This appears when CommandExpectation is used with regex for matching command's output:
expected_result = HammerCLI::Testing::CommandAssertions::CommandExpectation.new('', /.*created.*/, HammerCLI::EX_OK) result = run_cmd('organization create') assert_cmd(expected_result, result)
ArgumentError: wrong number of arguments (given 3, expected 1) /root/hammer/hammer-cli/lib/hammer_cli/testing/command_assertions.rb:15:in `assert_match' /root/hammer/hammer-cli/lib/hammer_cli/testing/command_assertions.rb:68:in `assert_equal_or_match' /root/hammer/hammer-cli/lib/hammer_cli/testing/command_assertions.rb:16:in `assert_match' /root/hammer/hammer-cli/lib/hammer_cli/testing/command_assertions.rb:57:in `assert_cmd' /root/hammer/hammer-cli-foreman-virt-who-configure/test/functional/config_test.rb:26:in `block (3 levels) in <top (required)>'
Updated by The Foreman Bot over 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/241 added
Updated by Marek Hulán over 7 years ago
- Target version changed from 1.13.4 to 1.14.0
Updated by Marek Hulán over 7 years ago
- Target version changed from 1.14.0 to 1.14.3
Updated by Anonymous over 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 3e3d1e6d690e43fe62ef17cdae85f46688b91548.
Updated by Tomáš Strachota over 7 years ago
- Translation missing: en.field_release set to 242
Actions