cucumber_analytics 0.0.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/History.rdoc +16 -0
- data/README.rdoc +5 -3
- data/Rakefile +7 -2
- data/cucumber_analytics.gemspec +7 -5
- data/features/analysis/step_collection.feature +44 -45
- data/features/modeling/background_modeling.feature +14 -144
- data/features/modeling/directory_modeling.feature +3 -2
- data/features/modeling/doc_string_modeling.feature +46 -0
- data/features/modeling/example_modeling.feature +13 -34
- data/features/modeling/feature_file_modeling.feature +3 -2
- data/features/modeling/feature_modeling.feature +18 -80
- data/features/modeling/outline_modeling.feature +25 -164
- data/features/modeling/scenario_modeling.feature +17 -144
- data/features/modeling/step_modeling.feature +68 -0
- data/features/modeling/table_modeling.feature +41 -0
- data/features/step_definitions/background_steps.rb +12 -11
- data/features/step_definitions/directory_steps.rb +6 -3
- data/features/step_definitions/doc_string_steps.rb +50 -0
- data/features/step_definitions/{file_steps.rb → feature_file_steps.rb} +8 -2
- data/features/step_definitions/feature_steps.rb +8 -4
- data/features/step_definitions/outline_steps.rb +12 -6
- data/features/step_definitions/setup_steps.rb +2 -2
- data/features/step_definitions/spec_steps.rb +6 -3
- data/features/step_definitions/step_steps.rb +91 -0
- data/features/step_definitions/table_steps.rb +10 -0
- data/features/step_definitions/test_steps.rb +6 -10
- data/features/step_definitions/world_steps.rb +28 -19
- data/features/support/env.rb +0 -2
- data/lib/cucumber_analytics/background.rb +16 -0
- data/lib/cucumber_analytics/containing.rb +18 -0
- data/lib/cucumber_analytics/directory.rb +83 -0
- data/lib/cucumber_analytics/doc_string.rb +55 -0
- data/lib/cucumber_analytics/example.rb +100 -0
- data/lib/cucumber_analytics/feature.rb +120 -0
- data/lib/cucumber_analytics/feature_element.rb +22 -40
- data/lib/cucumber_analytics/feature_file.rb +74 -0
- data/lib/cucumber_analytics/outline.rb +49 -0
- data/lib/cucumber_analytics/parsing.rb +30 -0
- data/lib/cucumber_analytics/scenario.rb +31 -0
- data/lib/cucumber_analytics/step.rb +142 -32
- data/lib/cucumber_analytics/table.rb +51 -0
- data/lib/cucumber_analytics/taggable.rb +35 -0
- data/lib/cucumber_analytics/test_element.rb +36 -91
- data/lib/cucumber_analytics/version.rb +1 -1
- data/lib/cucumber_analytics/world.rb +109 -153
- data/lib/cucumber_analytics.rb +12 -8
- data/spec/integration/background_integration_spec.rb +18 -0
- data/spec/integration/directory_integration_spec.rb +24 -0
- data/spec/{feature_spec.rb → integration/feature_file_integration_spec.rb} +5 -5
- data/spec/integration/feature_integration_spec.rb +86 -0
- data/spec/integration/outline_integration_spec.rb +22 -0
- data/spec/integration/scenario_integration_spec.rb +18 -0
- data/spec/integration/step_integration_spec.rb +116 -0
- data/spec/integration/world_integration_spec.rb +40 -0
- data/spec/spec_helper.rb +7 -3
- data/spec/unit/background_unit_spec.rb +22 -0
- data/spec/unit/bare_bones_unit_specs.rb +13 -0
- data/spec/unit/containing_element_unit_specs.rb +17 -0
- data/spec/unit/directory_unit_spec.rb +91 -0
- data/spec/unit/doc_string_unit_spec.rb +65 -0
- data/spec/unit/example_unit_spec.rb +171 -0
- data/spec/unit/feature_element_unit_spec.rb +19 -0
- data/spec/unit/feature_element_unit_specs.rb +39 -0
- data/spec/unit/feature_file_unit_spec.rb +82 -0
- data/spec/unit/feature_unit_spec.rb +81 -0
- data/spec/unit/nested_element_unit_specs.rb +24 -0
- data/spec/unit/outline_unit_spec.rb +56 -0
- data/spec/unit/parsing_unit_spec.rb +21 -0
- data/spec/unit/prepopulated_unit_specs.rb +13 -0
- data/spec/unit/scenario_unit_spec.rb +36 -0
- data/spec/unit/step_unit_spec.rb +231 -0
- data/spec/unit/table_unit_spec.rb +52 -0
- data/spec/unit/taggable_unit_spec.rb +63 -0
- data/spec/unit/tagged_element_unit_specs.rb +48 -0
- data/spec/unit/test_element_unit_spec.rb +40 -0
- data/spec/unit/test_element_unit_specs.rb +31 -0
- data/spec/unit/world_unit_spec.rb +167 -0
- metadata +106 -41
- data/lib/cucumber_analytics/logging.rb +0 -28
- data/lib/cucumber_analytics/outline_example.rb +0 -110
- data/lib/cucumber_analytics/parsed_background.rb +0 -45
- data/lib/cucumber_analytics/parsed_directory.rb +0 -78
- data/lib/cucumber_analytics/parsed_feature.rb +0 -97
- data/lib/cucumber_analytics/parsed_file.rb +0 -199
- data/lib/cucumber_analytics/parsed_scenario.rb +0 -67
- data/lib/cucumber_analytics/parsed_scenario_outline.rb +0 -122
- data/spec/background_spec.rb +0 -23
- data/spec/directory_spec.rb +0 -18
- data/spec/example_spec.rb +0 -37
- data/spec/file_spec.rb +0 -20
- data/spec/outline_spec.rb +0 -32
- data/spec/scenario_spec.rb +0 -33
- data/spec/step_spec.rb +0 -24
data/spec/scenario_spec.rb
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
SimpleCov.command_name('ParsedScenario') unless RUBY_VERSION.to_s < '1.9.0'
|
|
4
|
-
|
|
5
|
-
describe "ParsedScenario" do
|
|
6
|
-
|
|
7
|
-
it "knows all of its tags" do
|
|
8
|
-
feature = CucumberAnalytics::ParsedFeature.new
|
|
9
|
-
feature.tags = ['@feature_tag']
|
|
10
|
-
scenario = CucumberAnalytics::ParsedScenario.new
|
|
11
|
-
scenario.tags = ['@scenario_tag']
|
|
12
|
-
|
|
13
|
-
scenario.parent_element = feature
|
|
14
|
-
scenario.all_tags.sort.should == ['@feature_tag', '@scenario_tag'].sort
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
it 'knows its parent element' do
|
|
18
|
-
file_path = "#{@default_file_directory}/#{@default_feature_file_name}"
|
|
19
|
-
|
|
20
|
-
File.open(file_path, "w") { |file|
|
|
21
|
-
file.puts('Feature: Test feature')
|
|
22
|
-
file.puts(' Scenario: Test scenario')
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
file = CucumberAnalytics::ParsedFile.new(file_path)
|
|
26
|
-
|
|
27
|
-
feature = file.feature
|
|
28
|
-
scenario = feature.tests.first
|
|
29
|
-
|
|
30
|
-
scenario.parent_element.should equal feature
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
end
|
data/spec/step_spec.rb
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
SimpleCov.command_name('Step') unless RUBY_VERSION.to_s < '1.9.0'
|
|
4
|
-
|
|
5
|
-
describe 'Step' do
|
|
6
|
-
|
|
7
|
-
it 'knows its parent element' do
|
|
8
|
-
file_path = "#{@default_file_directory}/#{@default_feature_file_name}"
|
|
9
|
-
|
|
10
|
-
File.open(file_path, "w") { |file|
|
|
11
|
-
file.puts('Feature: Test feature')
|
|
12
|
-
file.puts(' Scenario: Test scenario')
|
|
13
|
-
file.puts(' Given a test step')
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
file = CucumberAnalytics::ParsedFile.new(file_path)
|
|
17
|
-
|
|
18
|
-
scenario = file.feature.tests.first
|
|
19
|
-
step = scenario.steps.first
|
|
20
|
-
|
|
21
|
-
step.parent_element.should equal scenario
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
end
|