cuukie 0.1.1 → 0.1.2
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/Rakefile +3 -6
- data/VERSION +1 -1
- data/bin/cuukie_server +2 -1
- data/cuukie.gemspec +14 -10
- data/{LICENSE.txt → doc/LICENSE.txt} +0 -0
- data/doc/backlog.txt +24 -0
- data/{pomodoro.txt → doc/pomodoro.txt} +6 -0
- data/lib/cuukie.rb +1 -0
- data/lib/cuukie/cucumber/formatter/cuukie.rb +56 -0
- data/lib/cuukie/public/cuukie.js +8 -3
- data/lib/cuukie/server.rb +13 -9
- data/lib/cuukie/views/index.erb +1 -6
- data/lib/test.rb +0 -0
- data/spec/cuukie_spec.rb +85 -93
- data/spec/test_project/features/1_visualize_scenarios.feature +21 -0
- data/spec/test_project/features/2_multiple_features.feature +8 -0
- data/spec/test_project/features/3_failed_background.feature +15 -0
- data/spec/test_project/features/step_definitions/example_steps.rb +3 -3
- data/spec/test_project/features/support/formatters.rb +1 -0
- metadata +24 -20
- data/lib/cuukie/formatter/cuukie.rb +0 -45
- data/spec/test_project/features/create_user.feature +0 -20
- data/spec/test_project/features/delete_user.feature +0 -9
data/Rakefile
CHANGED
@@ -9,11 +9,8 @@ namespace :test do
|
|
9
9
|
|
10
10
|
desc "Run Cuukie on the test project (needs a cuukie_server on localhost, default port)"
|
11
11
|
task :smoke do
|
12
|
-
system "
|
13
|
-
--
|
14
|
-
--require lib/cuukie/formatter \
|
15
|
-
--format Cuukie \
|
16
|
-
--guess"
|
12
|
+
system "cd spec/test_project && \
|
13
|
+
cucumber --format cuukie --guess"
|
17
14
|
end
|
18
15
|
end
|
19
16
|
|
@@ -23,7 +20,7 @@ Jeweler::Tasks.new do |gem|
|
|
23
20
|
gem.homepage = "http://github.com/nusco/cuukie"
|
24
21
|
gem.license = "MIT"
|
25
22
|
gem.summary = %Q{A continuous view on Cucumber features}
|
26
|
-
gem.description = %Q{
|
23
|
+
gem.description = %Q{Shows Cucumber results on a web page as they run.}
|
27
24
|
gem.email = "paolo.nusco.perrotta@gmail.com"
|
28
25
|
gem.authors = ['Paolo "Nusco" Perrotta']
|
29
26
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/bin/cuukie_server
CHANGED
data/cuukie.gemspec
CHANGED
@@ -5,16 +5,15 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "cuukie"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Paolo \"Nusco\" Perrotta"]
|
12
|
-
s.date = "2011-12-
|
13
|
-
s.description = "
|
12
|
+
s.date = "2011-12-05"
|
13
|
+
s.description = "Shows Cucumber results on a web page as they run."
|
14
14
|
s.email = "paolo.nusco.perrotta@gmail.com"
|
15
15
|
s.executables = ["cuukie_server"]
|
16
16
|
s.extra_rdoc_files = [
|
17
|
-
"LICENSE.txt",
|
18
17
|
"README.markdown"
|
19
18
|
]
|
20
19
|
s.files = [
|
@@ -22,24 +21,29 @@ Gem::Specification.new do |s|
|
|
22
21
|
".rspec",
|
23
22
|
".travis.yml",
|
24
23
|
"Gemfile",
|
25
|
-
"LICENSE.txt",
|
26
24
|
"README.markdown",
|
27
25
|
"Rakefile",
|
28
26
|
"VERSION",
|
29
27
|
"bin/cuukie_server",
|
30
28
|
"cuukie.gemspec",
|
31
|
-
"
|
29
|
+
"doc/LICENSE.txt",
|
30
|
+
"doc/backlog.txt",
|
31
|
+
"doc/pomodoro.txt",
|
32
|
+
"lib/cuukie.rb",
|
33
|
+
"lib/cuukie/cucumber/formatter/cuukie.rb",
|
32
34
|
"lib/cuukie/public/cucumber.css",
|
33
35
|
"lib/cuukie/public/cuukie.js",
|
34
36
|
"lib/cuukie/public/jquery-1.7.min.js",
|
35
37
|
"lib/cuukie/server.rb",
|
36
38
|
"lib/cuukie/views/index.erb",
|
37
|
-
"
|
39
|
+
"lib/test.rb",
|
38
40
|
"spec/commands_spec.rb",
|
39
41
|
"spec/cuukie_spec.rb",
|
40
|
-
"spec/test_project/features/
|
41
|
-
"spec/test_project/features/
|
42
|
-
"spec/test_project/features/
|
42
|
+
"spec/test_project/features/1_visualize_scenarios.feature",
|
43
|
+
"spec/test_project/features/2_multiple_features.feature",
|
44
|
+
"spec/test_project/features/3_failed_background.feature",
|
45
|
+
"spec/test_project/features/step_definitions/example_steps.rb",
|
46
|
+
"spec/test_project/features/support/formatters.rb"
|
43
47
|
]
|
44
48
|
s.homepage = "http://github.com/nusco/cuukie"
|
45
49
|
s.licenses = ["MIT"]
|
File without changes
|
data/doc/backlog.txt
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
MMF 0.2
|
2
|
+
- use formatter after installing gem
|
3
|
+
- updated README
|
4
|
+
- deal with Scenario Examples
|
5
|
+
- show tables in Scenarios
|
6
|
+
- show wrap-up for Scenarios
|
7
|
+
- show wrap-up for Steps
|
8
|
+
- show running time
|
9
|
+
- configure server and port
|
10
|
+
- work with Ruby 1.8.7
|
11
|
+
- fail gracefully when cuukie_server is down
|
12
|
+
MMF 0.3
|
13
|
+
- show exceptions
|
14
|
+
- show code snippets
|
15
|
+
MMF 0.4
|
16
|
+
- show incomplete results
|
17
|
+
- show undefined Scenarios/suite
|
18
|
+
- show undefined Steps
|
19
|
+
MMF 1.0
|
20
|
+
- nice graphics
|
21
|
+
- self-updating Steps
|
22
|
+
- self-updating Scenarios
|
23
|
+
- self-updating suite
|
24
|
+
- self-updating running time
|
@@ -1,6 +1,12 @@
|
|
1
1
|
I use this file to track my own work on the project. Each line is a pomodoro (a 25' slot).
|
2
2
|
Latest pomodoro comes first:
|
3
3
|
|
4
|
+
- working formatter out of gem
|
5
|
+
- working formatter out of gem
|
6
|
+
- show skipped scenarios
|
7
|
+
- show backgrounds
|
8
|
+
- show backgrounds
|
9
|
+
- show backgrounds
|
4
10
|
- refactor build status
|
5
11
|
- status for entire suite
|
6
12
|
- better scenario status
|
data/lib/cuukie.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/cuukie/cucumber/formatter/cuukie'
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'rest-client'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module Cucumber
|
5
|
+
module Formatter
|
6
|
+
class Cuukie
|
7
|
+
def initialize(step_mother, io, options)
|
8
|
+
end
|
9
|
+
|
10
|
+
def before_features(features)
|
11
|
+
post 'before_features'
|
12
|
+
end
|
13
|
+
|
14
|
+
def before_feature(feature)
|
15
|
+
post 'before_feature', { 'short_name' => feature.short_name,
|
16
|
+
'description' => feature.description }
|
17
|
+
end
|
18
|
+
|
19
|
+
def scenario_name(keyword, name, file_colon_line, source_indent)
|
20
|
+
post 'scenario_name', { 'keyword' => keyword,
|
21
|
+
'name' => name,
|
22
|
+
'file_colon_line' => file_colon_line }
|
23
|
+
end
|
24
|
+
|
25
|
+
def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
|
26
|
+
post 'before_step_result', { 'keyword' => keyword,
|
27
|
+
'name' => step_match.format_args,
|
28
|
+
'file_colon_line' => step_match.file_colon_line }
|
29
|
+
end
|
30
|
+
|
31
|
+
def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
|
32
|
+
post 'after_step_result', { 'status' => status }
|
33
|
+
end
|
34
|
+
|
35
|
+
def after_steps(*)
|
36
|
+
post 'after_steps'
|
37
|
+
end
|
38
|
+
|
39
|
+
def after_features(*)
|
40
|
+
post 'after_features'
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def post(url, params = {})
|
46
|
+
RestClient.post "http://localhost:4569/#{url}", params.to_json
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
require 'cucumber/cli/options'
|
53
|
+
Cucumber::Cli::Options::BUILTIN_FORMATS['cuukie'] = [
|
54
|
+
'Cucumber::Formatter::Cuukie',
|
55
|
+
'Shows Cucumber results on a web page as they run'
|
56
|
+
]
|
data/lib/cuukie/public/cuukie.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
SCENARIOS = "h3[id^='
|
1
|
+
SCENARIOS = "h3[id^='fe_']";
|
2
2
|
|
3
3
|
$(document).ready(function() {
|
4
4
|
$(SCENARIOS).css('cursor', 'pointer');
|
@@ -20,6 +20,11 @@ $(document).ready(function() {
|
|
20
20
|
function moveProgressBar(percentDone) {
|
21
21
|
$("cucumber-header").css('width', percentDone +"%");
|
22
22
|
}
|
23
|
+
|
24
|
+
function passedColors(element_id) {
|
25
|
+
$('#'+element_id).css('background', '#65c400');
|
26
|
+
$('#'+element_id).css('color', '#000000');
|
27
|
+
}
|
23
28
|
function failedColors(element_id) {
|
24
29
|
$('#'+element_id).css('background', '#C40D0D');
|
25
30
|
$('#'+element_id).css('color', '#FFFFFF');
|
@@ -28,7 +33,7 @@ function pendingColors(element_id) {
|
|
28
33
|
$('#'+element_id).css('background', '#FAF834');
|
29
34
|
$('#'+element_id).css('color', '#000000');
|
30
35
|
}
|
31
|
-
function
|
32
|
-
$('#'+element_id).css('background', '#
|
36
|
+
function skippedColors(element_id) {
|
37
|
+
$('#'+element_id).css('background', '#E0FFFF');
|
33
38
|
$('#'+element_id).css('color', '#000000');
|
34
39
|
}
|
data/lib/cuukie/server.rb
CHANGED
@@ -30,8 +30,8 @@ module Cuukie
|
|
30
30
|
post '/scenario_name' do
|
31
31
|
scenario = read_from_request
|
32
32
|
scenario['steps'] = []
|
33
|
-
scenario['id'] = "scenario_#{current_feature['id']}_#{
|
34
|
-
|
33
|
+
scenario['id'] = "scenario_#{current_feature['id']}_#{current_feature['scenarios'].size + 1}"
|
34
|
+
current_feature['scenarios'] << scenario
|
35
35
|
'OK'
|
36
36
|
end
|
37
37
|
|
@@ -52,6 +52,9 @@ module Cuukie
|
|
52
52
|
end
|
53
53
|
|
54
54
|
post '/after_steps' do
|
55
|
+
if current_scenario['steps'].all? {|step| step['status'] == 'skipped' }
|
56
|
+
current_scenario['status'] = 'skipped'
|
57
|
+
end
|
55
58
|
current_scenario['status'] ||= 'passed'
|
56
59
|
'OK'
|
57
60
|
end
|
@@ -63,17 +66,18 @@ module Cuukie
|
|
63
66
|
|
64
67
|
get('/ping') { 'pong!' }
|
65
68
|
delete('/') { exit! }
|
66
|
-
|
69
|
+
|
67
70
|
def current_feature
|
68
71
|
settings.features.last
|
69
72
|
end
|
70
73
|
|
71
|
-
def current_scenarios
|
72
|
-
current_feature['scenarios']
|
73
|
-
end
|
74
|
-
|
75
74
|
def current_scenario
|
76
|
-
|
75
|
+
# return a "nil scenario" (that includes a "nil step") if we
|
76
|
+
# don't have a scenario yet. this is useful to eliminate steps
|
77
|
+
# coming from backgrounds (which will be re-sent during the
|
78
|
+
# following scenarios anyway)
|
79
|
+
return { 'steps' => [{}] } if current_feature['scenarios'].empty?
|
80
|
+
current_feature['scenarios'].last
|
77
81
|
end
|
78
82
|
|
79
83
|
def current_step
|
@@ -83,7 +87,7 @@ module Cuukie
|
|
83
87
|
include Rack::Utils
|
84
88
|
|
85
89
|
def read_from_request
|
86
|
-
result = JSON.parse
|
90
|
+
result = JSON.parse request.body.read
|
87
91
|
result.each {|k, v| result[k] = escape_html v }
|
88
92
|
end
|
89
93
|
end
|
data/lib/cuukie/views/index.erb
CHANGED
@@ -25,7 +25,7 @@
|
|
25
25
|
<div class="scenario">
|
26
26
|
<span style="display: block;" class="scenario_file"><%= scenario['file_colon_line'] %></span>
|
27
27
|
<h3 style="cursor: pointer;" id="<%= scenario['id'] %>">
|
28
|
-
<span class="keyword"
|
28
|
+
<span class="keyword"><%= scenario['keyword'] %>: </span><span class="val"><%= scenario['name'] %></span>
|
29
29
|
</h3>
|
30
30
|
<script><%= scenario['status'] %>Colors('<%= scenario['id'] %>');</script>
|
31
31
|
<ol style="display: block;">
|
@@ -36,17 +36,12 @@
|
|
36
36
|
</div>
|
37
37
|
<div class="step_file"><span><%= step['file_colon_line'] %></span></div>
|
38
38
|
</li>
|
39
|
-
<!-- <script type="text/javascript">moveProgressBar('75.0');</script> -->
|
40
39
|
<% end %>
|
41
40
|
</ol>
|
42
41
|
</div>
|
43
42
|
<% end %>
|
44
43
|
</div>
|
45
44
|
<% end %>
|
46
|
-
<!--
|
47
|
-
<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0m8.171s seconds</strong>";</script>
|
48
|
-
<script type="text/javascript">document.getElementById('totals').innerHTML = "1 scenario (1 passed)<br />4 steps (4 passed)";</script>
|
49
|
-
-->
|
50
45
|
</div>
|
51
46
|
</body>
|
52
47
|
</html>
|
data/lib/test.rb
ADDED
File without changes
|
data/spec/cuukie_spec.rb
CHANGED
@@ -1,99 +1,91 @@
|
|
1
|
-
describe '
|
2
|
-
before(:all)
|
3
|
-
|
4
|
-
end
|
5
|
-
|
6
|
-
after(:all) do
|
7
|
-
stop_server
|
8
|
-
end
|
1
|
+
describe 'Cuukie' do
|
2
|
+
before(:all) { start_server }
|
3
|
+
after(:all) { stop_server }
|
9
4
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
html.should match '>Scenario: </span><span class="val">Existing User<'
|
59
|
-
end
|
60
|
-
|
61
|
-
it "shows the scenario source position" do
|
62
|
-
html.should match '>spec/test_project/features/create_user.feature:6<'
|
63
|
-
end
|
5
|
+
describe 'on the page header' do
|
6
|
+
it "contains essential information" do
|
7
|
+
run_cucumber
|
8
|
+
html.should match '<h1>Cucumber Features</h1>'
|
9
|
+
html.should match '<title>Cuukie</title>'
|
10
|
+
end
|
11
|
+
|
12
|
+
it "is green if all scenarios passed" do
|
13
|
+
run_cucumber '1_visualize_scenarios.feature:9'
|
14
|
+
html.should match /passedColors\('cucumber-header'\)/
|
15
|
+
end
|
16
|
+
|
17
|
+
it "is red if any scenario failed" do
|
18
|
+
run_cucumber '1_visualize_scenarios.feature'
|
19
|
+
html.should match /failedColors\('cucumber-header'\)/
|
20
|
+
end
|
21
|
+
|
22
|
+
it "is yellow if no scenarios failed but some are pending" do
|
23
|
+
run_cucumber '1_visualize_scenarios.feature:19'
|
24
|
+
html.should match /pendingColors\('cucumber-header'\)/
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'in the content area' do
|
29
|
+
before(:all) { run_cucumber }
|
30
|
+
|
31
|
+
it "cleans up previous data at the beginning of a run" do
|
32
|
+
run_cucumber
|
33
|
+
html.scan('Feature: Visualize Scenarios').size.should == 1
|
34
|
+
end
|
35
|
+
|
36
|
+
it "shows the feature names" do
|
37
|
+
html.should match '>Feature: Visualize Scenarios<'
|
38
|
+
html.should match '>Feature: Multiple Features<'
|
39
|
+
end
|
40
|
+
|
41
|
+
it "shows the feature narratives" do
|
42
|
+
html.should match '>As a Cuker<br/>I want to visualize Scenarios and Steps<br/>So that I know which steps are not passing<bbr/r><'
|
43
|
+
end
|
44
|
+
|
45
|
+
it "shows the scenario names" do
|
46
|
+
html.should match '>Scenario: </span><span class="val">Passing Scenario<'
|
47
|
+
html.should match '>Scenario: </span><span class="val">Failing Scenario<'
|
48
|
+
end
|
49
|
+
|
50
|
+
it "shows the scenario source position" do
|
51
|
+
html.should match '>features/1_visualize_scenarios.feature:9<'
|
52
|
+
end
|
64
53
|
|
65
|
-
|
66
|
-
|
67
|
-
|
54
|
+
it "shows the passed scenarios in green" do
|
55
|
+
html.should match /passedColors\('scenario_1_1'\)/
|
56
|
+
end
|
68
57
|
|
69
|
-
|
70
|
-
|
71
|
-
|
58
|
+
it "shows the failed scenarios in red" do
|
59
|
+
html.should match /failedColors\('scenario_3_1'\)/
|
60
|
+
end
|
72
61
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
62
|
+
it "shows the skipped scenarios in yellow" do
|
63
|
+
# This can happen if there is an error in a Background step.
|
64
|
+
# In this case, all the scenarios past the first one are skipped.
|
65
|
+
html.should match /skippedColors\('scenario_3_2'\)/
|
66
|
+
end
|
67
|
+
|
68
|
+
it "assigns a sequential id to feature elements" do
|
69
|
+
html.should match 'id="scenario_1_2"'
|
70
|
+
end
|
71
|
+
|
72
|
+
it "shows the step names" do
|
73
|
+
html.should match '>And </span><span class="step val">I do something</span>'
|
74
|
+
html.should match '>When </span><span class="step val">I do something else</span>'
|
75
|
+
end
|
85
76
|
|
86
|
-
|
87
|
-
|
88
|
-
|
77
|
+
it "shows the step source position" do
|
78
|
+
html.should match '>features/step_definitions/example_steps.rb:4<'
|
79
|
+
end
|
89
80
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
81
|
+
it "shows the step status" do
|
82
|
+
html.should match 'class="step passed"'
|
83
|
+
html.should match 'class="step pending"'
|
84
|
+
end
|
94
85
|
|
95
|
-
|
96
|
-
|
86
|
+
it "escapes step names" do
|
87
|
+
html.should match 'I pass an "argument"'
|
88
|
+
end
|
97
89
|
end
|
98
90
|
end
|
99
91
|
|
@@ -128,9 +120,9 @@ def html
|
|
128
120
|
GET('/').body
|
129
121
|
end
|
130
122
|
|
131
|
-
def run_cucumber(
|
132
|
-
system "
|
133
|
-
|
134
|
-
--
|
123
|
+
def run_cucumber(feature = '')
|
124
|
+
system "cd spec/test_project &&
|
125
|
+
cucumber features/#{feature} \
|
126
|
+
--format cuukie \
|
135
127
|
--guess"
|
136
128
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Feature: Visualize Scenarios
|
2
|
+
As a Cuker
|
3
|
+
I want to visualize Scenarios and Steps
|
4
|
+
So that I know which steps are not passing
|
5
|
+
|
6
|
+
Background: Common Steps
|
7
|
+
Given I do something for every Scenario
|
8
|
+
|
9
|
+
Scenario: Passing Scenario
|
10
|
+
And I do something
|
11
|
+
When I do something else
|
12
|
+
And I pass an "argument"
|
13
|
+
Then the entire Scenario should pass
|
14
|
+
|
15
|
+
Scenario: Failing Scenario
|
16
|
+
When I do something that results in an error
|
17
|
+
Then the entire Scenario should fail
|
18
|
+
|
19
|
+
Scenario: Pending Scenario
|
20
|
+
When I call a pending Step
|
21
|
+
Then the entire Scenario should be pending
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Feature: Show Failed Background
|
2
|
+
As a Cuker
|
3
|
+
I want to visualize Background failures
|
4
|
+
So that I know that everything else is skipped
|
5
|
+
|
6
|
+
Background: Failing Background
|
7
|
+
Given I do something that results in an error
|
8
|
+
|
9
|
+
Scenario: Skipped Scenario
|
10
|
+
When I do something
|
11
|
+
Then the entire Scenario should be skipped anyway
|
12
|
+
|
13
|
+
Scenario: Another Skipped Scenario
|
14
|
+
When I do something
|
15
|
+
Then the entire Scenario should be skipped anyway
|
@@ -1,11 +1,11 @@
|
|
1
|
-
When /^I
|
1
|
+
When /^I pass an "([^"]*)"$/ do |argument|
|
2
2
|
end
|
3
3
|
|
4
|
-
When /I
|
4
|
+
When /I do something that results in an error/ do
|
5
5
|
raise "Crash!"
|
6
6
|
end
|
7
7
|
|
8
|
-
When /I
|
8
|
+
When /I call a pending Step/ do
|
9
9
|
pending
|
10
10
|
end
|
11
11
|
|
@@ -0,0 +1 @@
|
|
1
|
+
require '../../lib/cuukie'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuukie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-12-
|
12
|
+
date: 2011-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
16
|
-
requirement: &
|
16
|
+
requirement: &70232862922920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70232862922920
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rest-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &70232862922360 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70232862922360
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: cucumber
|
38
|
-
requirement: &
|
38
|
+
requirement: &70232862921760 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70232862921760
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
|
-
requirement: &
|
49
|
+
requirement: &70232862921180 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70232862921180
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70232862920680 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,38 +65,42 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
-
description:
|
68
|
+
version_requirements: *70232862920680
|
69
|
+
description: Shows Cucumber results on a web page as they run.
|
70
70
|
email: paolo.nusco.perrotta@gmail.com
|
71
71
|
executables:
|
72
72
|
- cuukie_server
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files:
|
75
|
-
- LICENSE.txt
|
76
75
|
- README.markdown
|
77
76
|
files:
|
78
77
|
- .autotest
|
79
78
|
- .rspec
|
80
79
|
- .travis.yml
|
81
80
|
- Gemfile
|
82
|
-
- LICENSE.txt
|
83
81
|
- README.markdown
|
84
82
|
- Rakefile
|
85
83
|
- VERSION
|
86
84
|
- bin/cuukie_server
|
87
85
|
- cuukie.gemspec
|
88
|
-
-
|
86
|
+
- doc/LICENSE.txt
|
87
|
+
- doc/backlog.txt
|
88
|
+
- doc/pomodoro.txt
|
89
|
+
- lib/cuukie.rb
|
90
|
+
- lib/cuukie/cucumber/formatter/cuukie.rb
|
89
91
|
- lib/cuukie/public/cucumber.css
|
90
92
|
- lib/cuukie/public/cuukie.js
|
91
93
|
- lib/cuukie/public/jquery-1.7.min.js
|
92
94
|
- lib/cuukie/server.rb
|
93
95
|
- lib/cuukie/views/index.erb
|
94
|
-
-
|
96
|
+
- lib/test.rb
|
95
97
|
- spec/commands_spec.rb
|
96
98
|
- spec/cuukie_spec.rb
|
97
|
-
- spec/test_project/features/
|
98
|
-
- spec/test_project/features/
|
99
|
+
- spec/test_project/features/1_visualize_scenarios.feature
|
100
|
+
- spec/test_project/features/2_multiple_features.feature
|
101
|
+
- spec/test_project/features/3_failed_background.feature
|
99
102
|
- spec/test_project/features/step_definitions/example_steps.rb
|
103
|
+
- spec/test_project/features/support/formatters.rb
|
100
104
|
homepage: http://github.com/nusco/cuukie
|
101
105
|
licenses:
|
102
106
|
- MIT
|
@@ -112,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
116
|
version: '0'
|
113
117
|
segments:
|
114
118
|
- 0
|
115
|
-
hash:
|
119
|
+
hash: 375837505569438947
|
116
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
121
|
none: false
|
118
122
|
requirements:
|
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'rest-client'
|
2
|
-
require 'json'
|
3
|
-
|
4
|
-
class Cuukie
|
5
|
-
def initialize(step_mother, io, options)
|
6
|
-
end
|
7
|
-
|
8
|
-
def before_features(features)
|
9
|
-
post 'before_features', {}
|
10
|
-
end
|
11
|
-
|
12
|
-
def before_feature(feature)
|
13
|
-
post 'before_feature', { 'short_name' => feature.short_name,
|
14
|
-
'description' => feature.description }
|
15
|
-
end
|
16
|
-
|
17
|
-
def scenario_name(keyword, name, file_colon_line, source_indent)
|
18
|
-
post 'scenario_name', { 'name' => name,
|
19
|
-
'file_colon_line' => file_colon_line }
|
20
|
-
end
|
21
|
-
|
22
|
-
def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
|
23
|
-
post 'before_step_result', { 'keyword' => keyword,
|
24
|
-
'name' => step_match.format_args,
|
25
|
-
'file_colon_line' => step_match.file_colon_line }
|
26
|
-
end
|
27
|
-
|
28
|
-
def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background)
|
29
|
-
post 'after_step_result', { 'status' => status }
|
30
|
-
end
|
31
|
-
|
32
|
-
def after_steps(*)
|
33
|
-
post 'after_steps', {}
|
34
|
-
end
|
35
|
-
|
36
|
-
def after_features(*)
|
37
|
-
post 'after_features', {}
|
38
|
-
end
|
39
|
-
|
40
|
-
private
|
41
|
-
|
42
|
-
def post(url, params)
|
43
|
-
RestClient.post "http://localhost:4569/#{url}", params.to_json
|
44
|
-
end
|
45
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Feature: Create User
|
2
|
-
As an Administrator
|
3
|
-
I want to create a new User
|
4
|
-
So that he will love me
|
5
|
-
|
6
|
-
Scenario: New User
|
7
|
-
Given I am on the Admin page
|
8
|
-
When I create a new User
|
9
|
-
And I press "OK"
|
10
|
-
Then I should see the new User's details
|
11
|
-
|
12
|
-
Scenario: Existing User
|
13
|
-
Given I am on the Admin page
|
14
|
-
When I create a User with an existing id
|
15
|
-
Then I should see an error message
|
16
|
-
|
17
|
-
Scenario: Invalid User
|
18
|
-
Given I am on the Admin page
|
19
|
-
When I create a User with an empty name
|
20
|
-
Then I should see an error message
|