Skip to content

Commit

Permalink
update test to show how cmdline args are automatically enabled when s…
Browse files Browse the repository at this point in the history
…pecific tests are listed now.
  • Loading branch information
mvandervoord committed Apr 13, 2024
1 parent 519fc34 commit 4710fa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions spec/spec_system_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def exclude_test_case_name_filter_works_and_only_one_test_case_is_executed
end
end

def run_all_test_when_test_case_name_is_passed_but_cmdline_args_are_disabled_with_success
def run_all_test_when_test_case_name_is_passed_it_will_autoset_cmdline_args
@c.with_context do
Dir.chdir @proj_name do
FileUtils.cp test_asset_path("example_file.h"), 'src/'
Expand All @@ -665,11 +665,10 @@ def run_all_test_when_test_case_name_is_passed_but_cmdline_args_are_disabled_wit
output = `bundle exec ruby -S ceedling test:test_example_file_success --test_case=_adds_numbers 2>&1`

expect($?.exitstatus).to match(0) # Since a test either pass or are ignored, we return success here
expect(output).to match(/TESTED:\s+2/)
expect(output).to match(/TESTED:\s+1/)
expect(output).to match(/PASSED:\s+1/)
expect(output).to match(/FAILED:\s+0/)
expect(output).to match(/IGNORED:\s+1/)
expect(output).to match(/please add `:cmdline_args` under :test_runner option/)
expect(output).to match(/IGNORED:\s+0/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/system/deployment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
it { exclude_test_case_name_filter_works_and_only_one_test_case_is_executed }
it { none_of_test_is_executed_if_test_case_name_passed_does_not_fit_defined_in_test_file_and_cmdline_args_are_enabled }
it { none_of_test_is_executed_if_test_case_name_and_exclude_test_case_name_is_the_same }
it { run_all_test_when_test_case_name_is_passed_but_cmdline_args_are_disabled_with_success }
it { run_all_test_when_test_case_name_is_passed_it_will_autoset_cmdline_args }
end

describe "deployed in a project's `vendor` directory with git support." do
Expand Down

0 comments on commit 4710fa6

Please sign in to comment.