Skip to content

Commit

Permalink
renamed tests to describe what they were testing.
Browse files Browse the repository at this point in the history
got rid of empty scenarios as it was causing an issue in cucumber (cucumber/cucumber-ruby#967).
updated tests to use new line numbers because of empty scenario issue.
  • Loading branch information
Tommy Kelly committed Nov 27, 2016
1 parent 1d58a96 commit 508ae54
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 34 deletions.
10 changes: 5 additions & 5 deletions spec/lib/parallel_calabash/feature_grouper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@
describe :scenario_groups do
it 'should groups all @runnable scenario equally into 2 groups' do
expect(ParallelCalabash::FeatureGrouper.scenario_groups(2,{:feature_folder => ["spec/test_data/features"],:cucumber_options => "--tags @runnable"})).to eq \
[["spec/test_data/features/aaa.feature:10", "spec/test_data/features/aaa.feature:16", "spec/test_data/features/aaa.feature:19", "spec/test_data/features/bbb.feature:13"], ["spec/test_data/features/bbb.feature:16", "spec/test_data/features/ccc.feature:11", "spec/test_data/features/ddd.feature:7", "spec/test_data/features/ddd.feature:10"]]
[["spec/test_data/features/aaa.feature:12", "spec/test_data/features/aaa.feature:20", "spec/test_data/features/aaa.feature:24", "spec/test_data/features/bbb.feature:16"], ["spec/test_data/features/bbb.feature:20", "spec/test_data/features/ccc.feature:13", "spec/test_data/features/ddd.feature:8", "spec/test_data/features/ddd.feature:12"]]
end

it 'should groups all @runnable scenario equally into 2 groups' do
it 'should groups all @runnable scenario equally into 3 groups' do
expect(ParallelCalabash::FeatureGrouper.scenario_groups(3,{:feature_folder => ["spec/test_data/features"],:cucumber_options => "--tags @runnable"})).to eq \
[["spec/test_data/features/aaa.feature:10", "spec/test_data/features/aaa.feature:16", "spec/test_data/features/ddd.feature:7"], ["spec/test_data/features/aaa.feature:19", "spec/test_data/features/bbb.feature:13", "spec/test_data/features/ddd.feature:10"], ["spec/test_data/features/bbb.feature:16", "spec/test_data/features/ccc.feature:11"]]
[["spec/test_data/features/aaa.feature:12", "spec/test_data/features/aaa.feature:20", "spec/test_data/features/ddd.feature:8"],["spec/test_data/features/aaa.feature:24", "spec/test_data/features/bbb.feature:16", "spec/test_data/features/ddd.feature:12"], ["spec/test_data/features/bbb.feature:20", "spec/test_data/features/ccc.feature:13"]]
end

it 'should groups all @runnable scenario equally into 2 groups' do
it 'should groups all @runnable scenario equally into 4 groups' do
expect(ParallelCalabash::FeatureGrouper.scenario_groups(4,{:feature_folder => ["spec/test_data/features"],:cucumber_options => "--tags @runnable"})).to eq \
[["spec/test_data/features/aaa.feature:10", "spec/test_data/features/aaa.feature:16"], ["spec/test_data/features/aaa.feature:19", "spec/test_data/features/bbb.feature:13"], ["spec/test_data/features/bbb.feature:16", "spec/test_data/features/ccc.feature:11"], ["spec/test_data/features/ddd.feature:7", "spec/test_data/features/ddd.feature:10"]]
[["spec/test_data/features/aaa.feature:12", "spec/test_data/features/aaa.feature:20"], ["spec/test_data/features/aaa.feature:24", "spec/test_data/features/bbb.feature:16"], ["spec/test_data/features/bbb.feature:20", "spec/test_data/features/ccc.feature:13"], ["spec/test_data/features/ddd.feature:8", "spec/test_data/features/ddd.feature:12"]]
end

end
Expand Down
42 changes: 28 additions & 14 deletions spec/test_data/features/aaa.feature
Original file line number Diff line number Diff line change
@@ -1,43 +1,57 @@
Feature: aaa feature

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step
18 changes: 12 additions & 6 deletions spec/test_data/features/bbb.feature
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
Feature: bbb.feature

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag12
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step
12 changes: 8 additions & 4 deletions spec/test_data/features/ccc.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ Feature: ccc.feature


@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step
9 changes: 6 additions & 3 deletions spec/test_data/features/ddd.feature
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Feature: ddd.feature

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1 @runnable
Scenario:
Scenario: Scenario with name
Given I am just a simple step
6 changes: 4 additions & 2 deletions spec/test_data/features/eee.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Feature: eee feature

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

@tag1
Scenario:
Scenario: Scenario with name
Given I am just a simple step

0 comments on commit 508ae54

Please sign in to comment.