Skip to content

Commit

Permalink
Speed up tests
Browse files Browse the repository at this point in the history
by (1) making certain examples ignore uncovered files and (2) using
./spec/test_app as the Bashcov.root_directory for certain other
examples
  • Loading branch information
tomeon committed Oct 22, 2018
1 parent 86ccc01 commit b14a921
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion spec/bashcov/xtrace_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ def case_result

context "when shell expansion triggers subshell execution" do
it "causes extra hits to be reported" do
allow(Bashcov).to receive(:skip_uncovered).at_least(:once).and_return(true)

result_without_subshell = case_result

allow(Bashcov).to receive(:skip_uncovered).and_return(true)
allow(Bashcov::Xtrace).to receive(:ps4).and_return(subshell_ps4)

result_with_subshell = case_result
Expand Down
2 changes: 1 addition & 1 deletion spec/bashcov_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

describe Bashcov do
it "preserves the exit status" do
system("./bin/bashcov ./spec/test_app/scripts/exit_non_zero.sh")
system("./bin/bashcov --root ./spec/test_app ./spec/test_app/scripts/exit_non_zero.sh")
expect($?.exitstatus).not_to eq(0)
end

Expand Down

0 comments on commit b14a921

Please sign in to comment.