Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit f1ffb1f

Browse files
committed
Updated return from system so jenkins can get appropriate exit status, updated rspec unit test
1 parent 4e6b182 commit f1ffb1f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/cukesparse.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def build_command
5353
end
5454

5555
return debug if @parameters.has_key? 'debug'
56-
return system(@command.join(' '))
56+
result = system(@command.join(' '))
57+
exit result
5758
end
5859

5960
# Checks for task in arguments

spec/cukesparse/build_command_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
Cukesparse.command.should_receive(:push).with("--format html --out coverage/report.html -P -s").and_call_original
4545

4646
Cukesparse.should_receive(:system).with('bundle exec cucumber --require features/ features/featureOne features/featureTwo features/featureThree --tags test --tags tags1 --tags tags2 --format pretty --name feature1 --name feature2 --strict --verbose --dry-run --guess --expand ENVIRONMENT=release LOG_LEVEL=debug CLEANUP=true DATABASE=true JENKINS=true RETRIES=5 TIMEOUT=60 SCREENWIDTH=1280 SCREENHEIGHT=1024 XPOSITION=0 YPOSITION=0 HIGHLIGHT=true --format html --out coverage/report.html -P -s').and_return(true)
47+
Cukesparse.should_receive(:exit).with(true).and_return(0)
4748
Cukesparse.build_command
4849
end
4950

0 commit comments

Comments
 (0)