forked from pact-foundation/pact-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: do not create reports/pacts/help.md when executing verify from …
…a wrapper language
- Loading branch information
Showing
3 changed files
with
34 additions
and
3 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
27 changes: 27 additions & 0 deletions
27
spec/integration/executing_verify_from_wrapper_language_spec.rb
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
RSpec.describe "executing pact verify" do | ||
let(:command) { "bundle exec rake pact:verify:test_app:fail > /dev/null" } | ||
let(:reports_dir) { 'spec_reports' } # The config for this is in spec/support/pact_helper.rb | ||
|
||
before do | ||
FileUtils.rm_rf reports_dir | ||
end | ||
|
||
after do | ||
FileUtils.rm_rf reports_dir | ||
end | ||
|
||
context "from ruby" do | ||
it "creates a reports dir" do | ||
system({}, command) | ||
expect(File.exist?(reports_dir)).to be true | ||
end | ||
end | ||
|
||
context "with a wrapper language" do | ||
it "does not create a reports dir" do | ||
system({'PACT_EXECUTING_LANGUAGE' => 'foo'}, command) | ||
|
||
expect(File.exist?(reports_dir)).to be false | ||
end | ||
end | ||
end |
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