-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix simplecov and coveralls support.
Since Vagrant (and thus this plugin) run under a separate process, we need to trigger simplecov from within our plugin. We then have to have coveralls retrieve and send the results. We accomplish this by setting and environmental variable at the beginning of our tests which then triggers simplecov at the top of our plugin. Coveralls is then set up to merge the results (although there is only one set) and submit the results under its own rake task.
- Loading branch information
1 parent
4260731
commit 686747d
Showing
4 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#service_name: travis-ci | ||
service_name: travis-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Since simplecov need to run in the same process as the code being annalized, | ||
# we run initialize simplecov at the very beginning of our plugin. To only do | ||
# so during tests, we wrap it in a check for an environment variable. | ||
ENV['COVERAGE'] = 'true' | ||
require 'coveralls' | ||
Coveralls.wear! | ||
|
||
require 'vagrant-yaml' | ||
# Since simplecov is running under a separate process, we need to retrieve the | ||
# results afterwards. | ||
Coveralls.wear_merged! | ||
require 'aruba/cucumber' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
require 'rubygems' | ||
require 'cucumber' | ||
require 'cucumber/rake/task' | ||
require 'coveralls/rake/task' | ||
|
||
desc 'Default task which runs all cucumber tests' | ||
task :default => [:features] | ||
|
||
Coveralls::RakeTask.new | ||
task :default => [:features, 'coveralls:push'] | ||
Cucumber::Rake::Task.new(:features) do |t| | ||
t.cucumber_opts = "features --no-source --format pretty" | ||
end |