cucumber_analytics 0.0.3 → 0.0.4

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.
data/.gitignore CHANGED
@@ -1,17 +1,17 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/History.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === Version 0.0.4 / 2012-12-13
2
+
3
+ * Removed an unintentional gem dependency
4
+ * Improved 1.8.7 compatibility.
5
+
6
+
1
7
  === Version 0.0.3 / 2012-11-10
2
8
 
3
9
  * 'But' has been added to the list of recognized step keywords (formerly Given,
@@ -6,7 +12,7 @@ When,Then, And, and *)
6
12
  properly takes into account an outline's example rows.
7
13
 
8
14
 
9
- === Version 0.0.2 / 2012-11-1
15
+ === Version 0.0.2 / 2012-11-01
10
16
 
11
17
  * Bug fix: descriptions are no longer cut short due to the presence of keywords
12
18
 
data/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2012 Eric Kessler
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
1
+ Copyright (c) 2012 Eric Kessler
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc CHANGED
@@ -58,7 +58,7 @@ Now it's time to take a look around and see what we can see.
58
58
 
59
59
 
60
60
  all_steps = world.steps_in(directory)
61
- puts all_steps.collect{ |step| step.step_text(with_keywords: false)}
61
+ puts all_steps.collect{ |step| step.step_text(:with_keywords => false)}
62
62
  #=> ["some step", "the user logs in", "the user will log in", "another step", "the user "Bob" logs in"]
63
63
 
64
64
  So with a few simple commands we have discovered that there are five different
data/Rakefile CHANGED
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -17,7 +17,5 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.add_development_dependency("rake")
19
19
  gem.add_development_dependency("cucumber")
20
- gem.add_development_dependency("wrong")
21
20
  gem.add_development_dependency("simplecov")
22
- gem.add_development_dependency("log4r")
23
21
  end
@@ -3,7 +3,7 @@ Then /^the(?: feature "([^"]*)")? background is found to have the following prop
3
3
  properties = properties.rows_hash
4
4
 
5
5
  properties.each do |property, expected_value|
6
- assert { expected_value == @parsed_files[file - 1].feature.background.send(property.to_sym).to_s }
6
+ assert expected_value == @parsed_files[file - 1].feature.background.send(property.to_sym).to_s
7
7
  end
8
8
  end
9
9
 
@@ -11,7 +11,7 @@ Then /^the(?: feature "([^"]*)")? background's descriptive lines are as follows:
11
11
  file ||= 1
12
12
  expected_description = lines.raw.flatten
13
13
 
14
- assert { @parsed_files[file - 1].feature.background.description == expected_description }
14
+ assert @parsed_files[file - 1].feature.background.description == expected_description
15
15
  end
16
16
 
17
17
  Then /^the(?: feature "([^"]*)")? background's steps(?: "([^"]*)" arguments)?(?: "([^"]*)" keywords)? are as follows:$/ do |file, arguments, keywords, steps|
@@ -37,7 +37,7 @@ Then /^the(?: feature "([^"]*)")? background's steps(?: "([^"]*)" arguments)?(?:
37
37
  end
38
38
  end
39
39
 
40
- assert { actual_steps.flatten == steps }
40
+ assert actual_steps.flatten == steps
41
41
  end
42
42
 
43
43
  When /^step "([^"]*)" of the background (?:of feature "([^"]*)" )?has the following block:$/ do |step, file, block|
@@ -51,5 +51,5 @@ When /^step "([^"]*)" of the background (?:of feature "([^"]*)" )?has the follow
51
51
  end
52
52
  end
53
53
 
54
- assert { @parsed_files[file - 1].feature.background.steps[step - 1].block == block }
54
+ assert @parsed_files[file - 1].feature.background.steps[step - 1].block == block
55
55
  end
@@ -7,7 +7,7 @@ Then /^(?:the )?directory(?: "([^"]*)")? is found to have the following properti
7
7
  expected_value.sub!('path_to', @default_file_directory)
8
8
  end
9
9
 
10
- assert { expected_value == @parsed_directories[directory - 1].send(property.to_sym).to_s }
10
+ assert expected_value == @parsed_directories[directory - 1].send(property.to_sym).to_s
11
11
  end
12
12
  end
13
13
 
@@ -16,5 +16,5 @@ When /^(?:the )?directory(?: "([^"]*)")? feature files are as follows:$/ do |dir
16
16
 
17
17
  actual_files = @parsed_directories[directory - 1].feature_files.collect { |file| file.name }
18
18
 
19
- assert { actual_files.flatten.sort == files.raw.flatten.sort }
19
+ assert actual_files.flatten.sort == files.raw.flatten.sort
20
20
  end
@@ -3,28 +3,28 @@ Then /^(?:the )?feature(?: "([^"]*)")? is found to have the following properties
3
3
  properties = properties.rows_hash
4
4
 
5
5
  properties.each do |property, expected_value|
6
- assert { expected_value == @parsed_files[file - 1].feature.send(property.to_sym).to_s }
6
+ assert expected_value == @parsed_files[file - 1].feature.send(property.to_sym).to_s
7
7
  end
8
8
  end
9
9
 
10
10
  Then /^the descriptive lines of feature "([^"]*)" are as follows:$/ do |file, lines|
11
11
  expected_description = lines.raw.flatten
12
12
 
13
- assert { @parsed_files[file - 1].feature.description == expected_description }
13
+ assert @parsed_files[file - 1].feature.description == expected_description
14
14
  end
15
15
 
16
16
  Then /^feature "([^"]*)" is found to have the following tags:$/ do |file, tags|
17
17
  expected_tags = tags.raw.flatten
18
18
 
19
- assert { @parsed_files[file - 1].feature.tags == expected_tags }
19
+ assert @parsed_files[file - 1].feature.tags == expected_tags
20
20
  end
21
21
 
22
22
  Then /^feature "([^"]*)" has no descriptive lines$/ do |file|
23
- assert { @parsed_files[file - 1].feature.description == [] }
23
+ assert @parsed_files[file - 1].feature.description == []
24
24
  end
25
25
 
26
26
  Then /^feature "([^"]*)" has no tags$/ do |file|
27
- assert { @parsed_files[file - 1].feature.tags == [] }
27
+ assert @parsed_files[file - 1].feature.tags == []
28
28
  end
29
29
 
30
30
  When /^(?:the )?feature(?: "([^"]*)")? scenarios are as follows:$/ do |file, scenarios|
@@ -32,7 +32,7 @@ When /^(?:the )?feature(?: "([^"]*)")? scenarios are as follows:$/ do |file, sce
32
32
 
33
33
  actual_scenarios = @parsed_files[file - 1].feature.scenarios.collect { |scenario| scenario.name }
34
34
 
35
- assert { actual_scenarios.flatten.sort == scenarios.raw.flatten.sort }
35
+ assert actual_scenarios.flatten.sort == scenarios.raw.flatten.sort
36
36
  end
37
37
 
38
38
  When /^(?:the )?feature(?: "([^"]*)")? outlines are as follows:$/ do |file, outlines|
@@ -40,23 +40,23 @@ When /^(?:the )?feature(?: "([^"]*)")? outlines are as follows:$/ do |file, outl
40
40
 
41
41
  actual_outlines = @parsed_files[file - 1].feature.outlines.collect { |outline| outline.name }
42
42
 
43
- assert { actual_outlines.flatten.sort == outlines.raw.flatten.sort }
43
+ assert actual_outlines.flatten.sort == outlines.raw.flatten.sort
44
44
  end
45
45
 
46
46
  When /^(?:the )?feature(?: "([^"]*)")? background is as follows:$/ do |file, background|
47
47
  file ||= 1
48
48
 
49
- assert { @parsed_files[file - 1].feature.background.name == background.raw.flatten.first }
49
+ assert @parsed_files[file - 1].feature.background.name == background.raw.flatten.first
50
50
  end
51
51
 
52
52
  When /^feature "([^"]*)" has no scenarios$/ do |file|
53
- assert { @parsed_files[file - 1].feature.scenarios == [] }
53
+ assert @parsed_files[file - 1].feature.scenarios == []
54
54
  end
55
55
 
56
56
  When /^feature "([^"]*)" has no outlines/ do |file|
57
- assert { @parsed_files[file - 1].feature.outlines == [] }
57
+ assert @parsed_files[file - 1].feature.outlines == []
58
58
  end
59
59
 
60
60
  When /^feature "([^"]*)" has no background/ do |file|
61
- assert { @parsed_files[file - 1].feature.has_background? == false }
61
+ assert @parsed_files[file - 1].feature.has_background? == false
62
62
  end
@@ -7,12 +7,12 @@ Then /^(?:the )?file(?: "([^"]*)")? is found to have the following properties:$/
7
7
  expected_value.sub!('path_to', @test_directory)
8
8
  end
9
9
 
10
- assert { expected_value == @parsed_files[file - 1].send(property.to_sym).to_s }
10
+ assert expected_value == @parsed_files[file - 1].send(property.to_sym).to_s
11
11
  end
12
12
  end
13
13
 
14
14
  When /^(?:the )?file(?: "([^"]*)")? features are as follows:$/ do |file, feature|
15
15
  file ||= 1
16
16
 
17
- assert { @parsed_files[file - 1].feature.name == feature.raw.flatten.first }
17
+ assert @parsed_files[file - 1].feature.name == feature.raw.flatten.first
18
18
  end
@@ -1,26 +1,26 @@
1
1
  Then /^(?:feature "([^"]*)" )?"([^"]*)" example "([^"]*)" has a "([^"]*)"$/ do |file, test, example, name|
2
2
  file ||= 1
3
3
 
4
- assert { @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].name == name }
4
+ assert @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].name == name
5
5
  end
6
6
 
7
7
  When /^(?:feature "([^"]*)" )?"([^"]*)" example "([^"]*)" descriptive lines are as follows:$/ do |file, test, example, lines|
8
8
  file ||= 1
9
9
  lines = lines.raw.flatten.delete_if { |line| line == '' }
10
10
 
11
- assert { @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].description == lines }
11
+ assert @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].description == lines
12
12
  end
13
13
 
14
14
  When /^(?:feature "([^"]*)" )?"([^"]*)" example "([^"]*)" tags are as follows:$/ do |file, test, example, tags|
15
15
  file ||= 1
16
16
  tags = tags.raw.flatten.delete_if { |line| line == '' }
17
17
 
18
- assert { @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].tags == tags }
18
+ assert @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].tags == tags
19
19
  end
20
20
 
21
21
  When /^(?:feature "([^"]*)" )?"([^"]*)" example "([^"]*)" rows are as follows:$/ do |file, test, example, rows|
22
22
  file ||= 1
23
23
  rows = rows.raw.flatten
24
24
 
25
- assert { @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].rows == rows }
25
+ assert @parsed_files[file - 1].feature.tests[test - 1].examples[example - 1].rows == rows
26
26
  end
@@ -5,7 +5,7 @@ Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? is found to have the
5
5
  properties = properties.rows_hash
6
6
 
7
7
  properties.each do |property, value|
8
- assert { value == @parsed_files[file - 1].feature.tests[test - 1].send(property.to_sym).to_s }
8
+ assert value == @parsed_files[file - 1].feature.tests[test - 1].send(property.to_sym).to_s
9
9
  end
10
10
  end
11
11
 
@@ -14,7 +14,7 @@ Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? descriptive lines are
14
14
  test ||= 1
15
15
  lines = lines.raw.flatten
16
16
 
17
- assert { @parsed_files[file - 1].feature.tests[test - 1].description == lines }
17
+ assert @parsed_files[file - 1].feature.tests[test - 1].description == lines
18
18
  end
19
19
 
20
20
  Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? steps(?: "([^"]*)" arguments)?(?: "([^"]*)" keywords)? are as follows:$/ do |file, test, arguments, keywords, steps|
@@ -42,14 +42,14 @@ Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? steps(?: "([^"]*)" ar
42
42
  end
43
43
  end
44
44
 
45
- assert { actual_steps.flatten == steps }
45
+ assert actual_steps.flatten == steps
46
46
  end
47
47
 
48
48
  Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? is found to have the following tags:$/ do |file, test, tags|
49
49
  file ||= 1
50
50
  test ||= 1
51
51
 
52
- assert { @parsed_files[file - 1].feature.tests[test - 1].tags == tags.raw.flatten }
52
+ assert @parsed_files[file - 1].feature.tests[test - 1].tags == tags.raw.flatten
53
53
  end
54
54
 
55
55
  Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? step "([^"]*)" has the following block:$/ do |file, test, step, block|
@@ -64,19 +64,19 @@ Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? step "([^"]*)" has th
64
64
  end
65
65
  end
66
66
 
67
- assert { @parsed_files[file - 1].feature.tests[test - 1].steps[step - 1].block == block }
67
+ assert @parsed_files[file - 1].feature.tests[test - 1].steps[step - 1].block == block
68
68
  end
69
69
 
70
70
  Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? is equal to test "([^"]*)"$/ do |file, first_test, second_test|
71
71
  file ||= 1
72
72
  first_test ||= 1
73
73
 
74
- assert { @parsed_files[file - 1].feature.tests[first_test - 1] == @parsed_files[file - 1].feature.tests[second_test - 1] }
74
+ assert @parsed_files[file - 1].feature.tests[first_test - 1] == @parsed_files[file - 1].feature.tests[second_test - 1]
75
75
  end
76
76
 
77
77
  Then /^(?:the )?(?:feature "([^"]*)" )?test(?: "([^"]*)")? is not equal to test "([^"]*)"$/ do |file, first_test, second_test|
78
78
  file ||= 1
79
79
  first_test ||= 1
80
80
 
81
- assert { @parsed_files[file - 1].feature.tests[first_test - 1] != @parsed_files[file - 1].feature.tests[second_test - 1] }
81
+ assert @parsed_files[file - 1].feature.tests[first_test - 1] != @parsed_files[file - 1].feature.tests[second_test - 1]
82
82
  end
@@ -2,27 +2,27 @@ Then /^the tags collected from (?:feature "([^"]*)" )?test "([^"]*)" are as foll
2
2
  file ||= 1
3
3
  tags = tags.raw.flatten
4
4
 
5
- assert { CucumberAnalytics::World.tags_in(@parsed_files[file - 1].feature.tests[test - 1]).sort == tags.sort }
5
+ assert CucumberAnalytics::World.tags_in(@parsed_files[file - 1].feature.tests[test - 1]).sort == tags.sort
6
6
  end
7
7
 
8
8
  Then /^the tags collected from feature "([^"]*)" are as follows:$/ do |file, tags|
9
9
  file ||= 1
10
10
  tags = tags.raw.flatten
11
11
 
12
- assert { CucumberAnalytics::World.tags_in(@parsed_files[file - 1].feature).sort == tags.sort }
12
+ assert CucumberAnalytics::World.tags_in(@parsed_files[file - 1].feature).sort == tags.sort
13
13
  end
14
14
 
15
15
  Then /^the tags collected from file "([^"]*)" are as follows:$/ do |file, tags|
16
16
  file ||= 1
17
17
  tags = tags.raw.flatten
18
18
 
19
- assert { CucumberAnalytics::World.tags_in(@parsed_files[file - 1]).sort == tags.sort }
19
+ assert CucumberAnalytics::World.tags_in(@parsed_files[file - 1]).sort == tags.sort
20
20
  end
21
21
 
22
22
  Then /^the tags collected from directory are as follows:$/ do |tags|
23
23
  tags = tags.raw.flatten
24
24
 
25
- assert { CucumberAnalytics::World.tags_in(@parsed_directories.last).sort == tags.sort }
25
+ assert CucumberAnalytics::World.tags_in(@parsed_directories.last).sort == tags.sort
26
26
  end
27
27
 
28
28
  Then /^the(?: "([^"]*)")? steps collected from feature "([^"]*)" background are as follows:$/ do |defined, file, steps|
@@ -39,7 +39,7 @@ Then /^the(?: "([^"]*)")? steps collected from feature "([^"]*)" background are
39
39
  expected_steps = CucumberAnalytics::World.steps_in(container)
40
40
  end
41
41
 
42
- assert { expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort }
42
+ assert expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort
43
43
  end
44
44
 
45
45
  Then /^the(?: "([^"]*)")? steps collected from feature "([^"]*)" test "([^"]*)" are as follows:$/ do |defined, file, test, steps|
@@ -56,7 +56,7 @@ Then /^the(?: "([^"]*)")? steps collected from feature "([^"]*)" test "([^"]*)"
56
56
  expected_steps = CucumberAnalytics::World.steps_in(container)
57
57
  end
58
58
 
59
- assert { expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort }
59
+ assert expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort
60
60
  end
61
61
 
62
62
  When /^the(?: "([^"]*)")? steps collected from (?:the )?feature(?: "([^"]*)")? are as follows:$/ do |defined, file, steps|
@@ -73,7 +73,7 @@ When /^the(?: "([^"]*)")? steps collected from (?:the )?feature(?: "([^"]*)")? a
73
73
  expected_steps = CucumberAnalytics::World.steps_in(container)
74
74
  end
75
75
 
76
- assert { expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort }
76
+ assert expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort
77
77
  end
78
78
 
79
79
  When /^the(?: "([^"]*)")? steps collected from (?:the )?file(?: "([^"]*)")? are as follows:$/ do |defined, file, steps|
@@ -90,7 +90,7 @@ When /^the(?: "([^"]*)")? steps collected from (?:the )?file(?: "([^"]*)")? are
90
90
  expected_steps = CucumberAnalytics::World.steps_in(container)
91
91
  end
92
92
 
93
- assert { expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort }
93
+ assert expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort
94
94
  end
95
95
 
96
96
  When /^the(?: "([^"]*)")? steps collected from the directory are as follows:$/ do |defined, steps|
@@ -106,7 +106,7 @@ When /^the(?: "([^"]*)")? steps collected from the directory are as follows:$/ d
106
106
  expected_steps = CucumberAnalytics::World.steps_in(container)
107
107
  end
108
108
 
109
- assert { expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort }
109
+ assert expected_steps.collect { |step| step.step_text }.flatten.sort == steps.sort
110
110
  end
111
111
 
112
112
  Then /^the tests collected from feature "([^"]*)" are as follows:$/ do |file, tests|
@@ -114,7 +114,7 @@ Then /^the tests collected from feature "([^"]*)" are as follows:$/ do |file, te
114
114
 
115
115
  actual_tests = CucumberAnalytics::World.tests_in(@parsed_files[file - 1].feature).collect { |test| test.name }
116
116
 
117
- assert { actual_tests.flatten.sort == tests.raw.flatten.sort }
117
+ assert actual_tests.flatten.sort == tests.raw.flatten.sort
118
118
  end
119
119
 
120
120
  Then /^the tests collected from file "([^"]*)" are as follows:$/ do |file, tests|
@@ -122,7 +122,7 @@ Then /^the tests collected from file "([^"]*)" are as follows:$/ do |file, tests
122
122
 
123
123
  actual_tests = CucumberAnalytics::World.tests_in(@parsed_files[file - 1]).collect { |test| test.name }
124
124
 
125
- assert { actual_tests.flatten.sort == tests.raw.flatten.sort }
125
+ assert actual_tests.flatten.sort == tests.raw.flatten.sort
126
126
  end
127
127
 
128
128
  Then /^the tests collected from directory "([^"]*)" are as follows:$/ do |directory, tests|
@@ -130,7 +130,7 @@ Then /^the tests collected from directory "([^"]*)" are as follows:$/ do |direct
130
130
 
131
131
  actual_tests = CucumberAnalytics::World.tests_in(@parsed_directories[directory - 1]).collect { |test| test.name }
132
132
 
133
- assert { actual_tests.flatten.sort == tests.raw.flatten.sort }
133
+ assert actual_tests.flatten.sort == tests.raw.flatten.sort
134
134
  end
135
135
 
136
136
  Then /^the features collected from file "([^"]*)" are as follows:$/ do |file, features|
@@ -138,7 +138,7 @@ Then /^the features collected from file "([^"]*)" are as follows:$/ do |file, fe
138
138
 
139
139
  actual_features = CucumberAnalytics::World.features_in(@parsed_files[file - 1]).collect { |feature| feature.name }
140
140
 
141
- assert { actual_features.flatten.sort == features.raw.flatten.sort }
141
+ assert actual_features.flatten.sort == features.raw.flatten.sort
142
142
  end
143
143
 
144
144
  Then /^the features collected from directory "([^"]*)" are as follows:$/ do |directory, features|
@@ -146,7 +146,7 @@ Then /^the features collected from directory "([^"]*)" are as follows:$/ do |dir
146
146
 
147
147
  actual_features = CucumberAnalytics::World.features_in(@parsed_directories[directory - 1]).collect { |feature| feature.name }
148
148
 
149
- assert { actual_features.flatten.sort == features.raw.flatten.sort }
149
+ assert actual_features.flatten.sort == features.raw.flatten.sort
150
150
  end
151
151
 
152
152
  Then /^the files collected from directory "([^"]*)" are as follows:$/ do |directory, files|
@@ -154,5 +154,5 @@ Then /^the files collected from directory "([^"]*)" are as follows:$/ do |direct
154
154
 
155
155
  actual_files = CucumberAnalytics::World.files_in(@parsed_directories[directory - 1]).collect { |file| file.name }
156
156
 
157
- assert { actual_files.flatten.sort == files.raw.flatten.sort }
157
+ assert actual_files.flatten.sort == files.raw.flatten.sort
158
158
  end
@@ -1,19 +1,13 @@
1
- require 'simplecov'
2
- SimpleCov.start
1
+ unless RUBY_VERSION.to_s < '1.9.0'
2
+ require 'simplecov'
3
+ SimpleCov.start
4
+ end
3
5
 
4
- require 'wrong'
5
- include Wrong
6
+ include Test::Unit::Assertions
6
7
 
7
8
  require File.dirname(__FILE__) + '/../../lib/cucumber_analytics'
8
9
 
9
- Log4r::Logger.root.level = Log4r::OFF
10
-
11
- Log4r::FileOutputter.new('logfile',
12
- :filename=>'test_log.txt',
13
- :trunc=>true,
14
- :level=>Log4r::DEBUG)
15
-
16
- CucumberAnalytics::Logging.logger.add('logfile')
10
+ CucumberAnalytics::Logging.set_log_level(Logger::FATAL)
17
11
 
18
12
 
19
13
  DEFAULT_FEATURE_FILE_NAME = 'test_feature.feature'
@@ -1,8 +1,20 @@
1
1
  module CucumberAnalytics
2
2
  module Logging
3
3
 
4
- def self.logger
5
- @logger ||= Log4r::Logger.new('ca_logger')
4
+ class << self
5
+
6
+ def set_log_level(log_level)
7
+ logger.level = log_level
8
+ end
9
+
10
+ def logger
11
+ @logger ||= Logger.new('logfile.log')
12
+ end
13
+
14
+ def logger=(new_logger)
15
+ @logger = new_logger
16
+ end
17
+
6
18
  end
7
19
 
8
20
  end
@@ -21,8 +21,8 @@ module CucumberAnalytics
21
21
  # Returns true if the two steps have the same text, minus any keywords
22
22
  # and arguments, and false otherwise.
23
23
  def ==(other_step)
24
- left_step = step_text(with_keywords: false, with_arguments: false)
25
- right_step = other_step.step_text(with_keywords: false, with_arguments: false)
24
+ left_step = step_text(:with_keywords => false, :with_arguments => false)
25
+ right_step = other_step.step_text(:with_keywords => false, :with_arguments => false)
26
26
 
27
27
  left_step == right_step
28
28
  end
@@ -35,18 +35,18 @@ module CucumberAnalytics
35
35
  #
36
36
  # a_step.step_text
37
37
  # #=> ['Given *some* step with a block:', 'block line 1', 'block line 2']
38
- # a_step.step_text(with_keywords: false)
38
+ # a_step.step_text(:with_keywords => false)
39
39
  # #=> ['*some* step with a block:', 'block line 1', 'block line 2']
40
- # a_step.step_text(with_arguments: false, left_delimiter: '*', right_delimiter: '*')
40
+ # a_step.step_text(:with_arguments => false, :left_delimiter => '*', :right_delimiter => '*')
41
41
  # #=> ['Given ** step with a block:']
42
- # a_step.step_text(with_keywords: false, with_arguments: false, left_delimiter: '-', right_delimiter: '-'))
42
+ # a_step.step_text(:with_keywords => false, :with_arguments => false, :left_delimiter => '-', :right_delimiter => '-'))
43
43
  # #=> ['*some* step with a block:']
44
44
  #
45
45
  def step_text(options = {})
46
- options = {with_keywords: true,
47
- with_arguments: true,
48
- left_delimiter: World.left_delimiter,
49
- right_delimiter: World.right_delimiter}.merge(options)
46
+ options = {:with_keywords => true,
47
+ :with_arguments => true,
48
+ :left_delimiter => World.left_delimiter,
49
+ :right_delimiter => World.right_delimiter}.merge(options)
50
50
 
51
51
  final_step = []
52
52
  step_text = ''
@@ -1,3 +1,3 @@
1
- module CucumberAnalytics
2
- VERSION = "0.0.3"
3
- end
1
+ module CucumberAnalytics
2
+ VERSION = "0.0.4"
3
+ end
@@ -1,5 +1,3 @@
1
- require "log4r"
2
-
3
1
  require 'cucumber_analytics/version'
4
2
  require 'cucumber_analytics/logging'
5
3
  require 'cucumber_analytics/parsed_file'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-10 00:00:00.000000000 Z
12
+ date: 2012-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -43,22 +43,6 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: wrong
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
46
  - !ruby/object:Gem::Dependency
63
47
  name: simplecov
64
48
  requirement: !ruby/object:Gem::Requirement
@@ -75,22 +59,6 @@ dependencies:
75
59
  - - ! '>='
76
60
  - !ruby/object:Gem::Version
77
61
  version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: log4r
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- type: :development
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
62
  description: Static analysis of Cucumber tests made easy.
95
63
  email:
96
64
  - morrow748@gmail.com