-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #546 from scotje/1067_test_unit_parallel
(PDK-1067) Ensure rspec-core binstubs are created for `pdk test unit`
- Loading branch information
Showing
4 changed files
with
48 additions
and
2 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
35 changes: 35 additions & 0 deletions
35
package-testing/spec/package/unit_test_a_new_module_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,35 @@ | ||
require 'spec_helper_package' | ||
|
||
describe 'Generate a module for unit testing' do | ||
module_name = 'unit_test_module' | ||
|
||
context 'when creating a new module and new class' do | ||
describe command("pdk new module #{module_name} --skip-interview") do | ||
its(:exit_status) { is_expected.to eq(0) } | ||
end | ||
|
||
describe command("pdk new class #{module_name}") do | ||
let(:cwd) { module_name } | ||
|
||
its(:exit_status) { is_expected.to eq(0) } | ||
end | ||
end | ||
|
||
context 'when unit testing' do | ||
describe command('pdk test unit') do | ||
let(:cwd) { module_name } | ||
|
||
its(:exit_status) { is_expected.to eq(0) } | ||
its(:stderr) { is_expected.to match(%r{evaluated 4 tests.*0 failures}im) } | ||
end | ||
end | ||
|
||
context 'when unit testing in parallel' do | ||
describe command('pdk test unit --parallel') do | ||
let(:cwd) { module_name } | ||
|
||
its(:exit_status) { is_expected.to eq(0) } | ||
its(:stderr) { is_expected.to match(%r{evaluated 4 tests.*0 failures}im) } | ||
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
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