cuukie 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  rvm:
2
- # - 1.8.7
2
+ - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
- # - rbx-2.0
5
+ - rbx-2.0
@@ -1,5 +1,47 @@
1
- Cuukie shows your Cucumber results in a web page as they run.
1
+ # Cuukie
2
+
3
+ Cuukie shows your Cucumber results on a web page.
2
4
 
3
5
  [![Build Status](https://secure.travis-ci.org/nusco/cuukie.png)](http://travis-ci.org/nusco/cuukie.png)
4
6
 
5
- There is a gem out, but it's still an early version. I'll update this README when Cuukie is a tad more solid.
7
+ ## Using it
8
+
9
+ Install Cuukie:
10
+
11
+ gem install cuukie
12
+
13
+ (Or better still, you can use Bundler).
14
+
15
+ Require Cuukie from any file in your _features/support_ directory:
16
+
17
+ require 'cuukie'
18
+
19
+ Start the Cuukie server from a terminal window and leave it running:
20
+
21
+ cuukie_server
22
+
23
+ Leave the server running. When you run Cucumber, ask it to use the _cuukie_ formatter:
24
+
25
+ cucumber --format cuukie
26
+
27
+ To look at the results, open this page in a browser:
28
+
29
+ http://localhost:4569
30
+
31
+ ## Custom port/server
32
+
33
+ You can pick a port when you start the cuukie_server...
34
+
35
+ cuukie_server 4570
36
+
37
+ ...and you can tell the cuukie formatter where to look for the server:
38
+
39
+ cucumber --format cuukie CUUKIE_SERVER=http://my.server:4570
40
+
41
+ ## Cuukie Vision
42
+
43
+ Right now, Cuukie is not any more useful than Cucumber's own HTML formatter. My plan is to make it more dynamic. You'll be able to see your steps as they run, just like you do with the default command-line formatter - but on a web page. Cuukie wants to be a good choice both when you want to run Cucumber tests locally, and when you want to show Cucumber tests on your build machine.
44
+
45
+ ## License
46
+
47
+ MIT License. Copyright (c) 2011 Paolo "Nusco" Perrotta.
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ namespace :test do
10
10
  desc "Run Cuukie on the test project (needs a cuukie_server on localhost, default port)"
11
11
  task :smoke do
12
12
  system "cd spec/test_project && \
13
- cucumber --format cuukie --guess"
13
+ cucumber --format cuukie"
14
14
  end
15
15
  end
16
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -3,4 +3,7 @@ lib = File.dirname(__FILE__) + '/../lib'
3
3
  $:.unshift lib unless $:.include? lib
4
4
 
5
5
  require 'cuukie/server'
6
- Cuukie::Server.run!
6
+ module Cuukie
7
+ Server.set :port, ARGV[0] || 4569
8
+ Server.run!
9
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cuukie"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
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-05"
12
+ s.date = "2011-12-07"
13
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"]
@@ -39,9 +39,11 @@ Gem::Specification.new do |s|
39
39
  "lib/test.rb",
40
40
  "spec/commands_spec.rb",
41
41
  "spec/cuukie_spec.rb",
42
- "spec/test_project/features/1_visualize_scenarios.feature",
42
+ "spec/spec_helper.rb",
43
+ "spec/test_project/features/1_show_scenarios.feature",
43
44
  "spec/test_project/features/2_multiple_features.feature",
44
45
  "spec/test_project/features/3_failed_background.feature",
46
+ "spec/test_project/features/4_show_multiline_args.feature",
45
47
  "spec/test_project/features/step_definitions/example_steps.rb",
46
48
  "spec/test_project/features/support/formatters.rb"
47
49
  ]
@@ -1,24 +1,44 @@
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
1
+ MMF 0.4
13
2
  - show exceptions
14
3
  - show code snippets
15
- MMF 0.4
16
- - show incomplete results
4
+ MMF 0.5
5
+ - show incomplete suite
17
6
  - show undefined Scenarios/suite
18
7
  - show undefined Steps
8
+ - show incomplete wrap-up for steps/scenarios
9
+ - show incomplete running time
10
+ MMF 0.6
11
+ - deal with Scenario Examples
19
12
  MMF 1.0
20
13
  - nice graphics
21
14
  - self-updating Steps
22
15
  - self-updating Scenarios
23
16
  - self-updating suite
17
+ - self-updating scenario wrap-up
18
+ - self-updating step wrap-up
24
19
  - self-updating running time
20
+
21
+ Then...
22
+
23
+ - show tags
24
+
25
+ - filter by tag
26
+
27
+ - show status for each table row (table rows have an
28
+ associated status in Cucumber formatters, and the
29
+ HTML formatter seems to take advantage of this. Why?
30
+ And what consequences does this have on the way
31
+ Scenario status is calculated in Cuukie?)
32
+
33
+ - find better way to manage Scenario/Step status (Cuukie
34
+ calculates the status of Scenarios with a few ugly
35
+ ifs and other dirty tricks. Maybe that information
36
+ is already known to the formatter, and it's
37
+ just a matter of using the right formatter events?)
38
+
39
+ - check rbx bug (interestingly, Rubynius has a different
40
+ idea of where a "step" is. it seems to return different
41
+ lines for steps than other rubies. I removed the line
42
+ numbers from tests b/c of this, and b/c they made the
43
+ tests fragile. Try to put back the line numbers,
44
+ and test under rbx)
@@ -1,6 +1,17 @@
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
+ - run formatter with custom server
5
+ - run formatter with custom server
6
+ - run server on custom port
7
+ - wrap-ups for steps and scenarios
8
+ - wrap-ups for steps and scenarios
9
+ - show multiline arguments
10
+ - compatibility with ruby 1.8.7 and rbx
11
+ - fix ambiguous steps in test features
12
+ - support for tables
13
+ - fail gracefully when cuukie_server is down
14
+ - working formatter out of gem (DONE)
4
15
  - working formatter out of gem
5
16
  - working formatter out of gem
6
17
  - show skipped scenarios
@@ -4,7 +4,13 @@ require 'json'
4
4
  module Cucumber
5
5
  module Formatter
6
6
  class Cuukie
7
- def initialize(step_mother, io, options)
7
+ def initialize(step_mother, path_or_io, options)
8
+ @server = ENV['CUUKIE_SERVER'] || 'http://localhost:4569'
9
+ ping
10
+ rescue
11
+ puts "I cannot find the cuukie_server on #{@server}."
12
+ puts "Please start the server with the cuukie_server command."
13
+ exit
8
14
  end
9
15
 
10
16
  def before_features(features)
@@ -12,6 +18,7 @@ module Cucumber
12
18
  end
13
19
 
14
20
  def before_feature(feature)
21
+ # TODO: use symbols as hash keys?
15
22
  post 'before_feature', { 'short_name' => feature.short_name,
16
23
  'description' => feature.description }
17
24
  end
@@ -35,15 +42,31 @@ module Cucumber
35
42
  def after_steps(*)
36
43
  post 'after_steps'
37
44
  end
38
-
39
- def after_features(*)
40
- post 'after_features'
45
+
46
+ def before_table_row(table_row)
47
+ post 'before_table_row'
41
48
  end
42
-
49
+
50
+ def table_cell_value(value, status)
51
+ post 'table_cell_value', { 'value' => value }
52
+ end
53
+
54
+ def doc_string(string)
55
+ post 'doc_string', { 'multiline_string' => string }
56
+ end
57
+
58
+ def after_features(features)
59
+ post 'after_features', { 'duration' => features.duration }
60
+ end
61
+
43
62
  private
44
63
 
45
64
  def post(url, params = {})
46
- RestClient.post "http://localhost:4569/#{url}", params.to_json
65
+ RestClient.post "#{@server}/#{url}", params.to_json
66
+ end
67
+
68
+ def ping
69
+ RestClient.get "#{@server}/ping"
47
70
  end
48
71
  end
49
72
  end
@@ -1,4 +1,4 @@
1
- SCENARIOS = "h3[id^='fe_']";
1
+ SCENARIOS = "h3[id^='scenario_']";
2
2
 
3
3
  $(document).ready(function() {
4
4
  $(SCENARIOS).css('cursor', 'pointer');
@@ -3,19 +3,25 @@ require 'json'
3
3
 
4
4
  module Cuukie
5
5
  class Server < Sinatra::Base
6
- set :port, 4569
7
6
  set :features, []
8
7
  set :build_status, nil
8
+ set :stats, {:scenarios => '', :steps => ''}
9
+ set :duration, '?'
9
10
 
10
11
  get '/' do
11
- @features = settings.features
12
+ @features = settings.features
12
13
  @build_status = settings.build_status
14
+ @duration = settings.duration
15
+ @stats = settings.stats
13
16
  erb :index
14
17
  end
15
18
 
16
19
  post '/before_features' do
17
20
  settings.features.clear
18
21
  settings.build_status = nil
22
+ settings.stats = {:scenarios => '', :steps => ''}
23
+ settings.duration = '?'
24
+ settings.build_status = nil
19
25
  end
20
26
 
21
27
  post '/before_feature' do
@@ -36,7 +42,9 @@ module Cuukie
36
42
  end
37
43
 
38
44
  post '/before_step_result' do
39
- current_scenario['steps'] << read_from_request
45
+ step = read_from_request
46
+ step['table'] = []
47
+ current_scenario['steps'] << step
40
48
  'OK'
41
49
  end
42
50
 
@@ -58,12 +66,33 @@ module Cuukie
58
66
  current_scenario['status'] ||= 'passed'
59
67
  'OK'
60
68
  end
61
-
69
+
70
+ post '/before_table_row' do
71
+ current_step['table'] << []
72
+ 'OK'
73
+ end
74
+
75
+ post '/table_cell_value' do
76
+ data = read_from_request
77
+ current_step['table'].last << data['value']
78
+ 'OK'
79
+ end
80
+
81
+ post '/doc_string' do
82
+ data = read_from_request
83
+ current_step['multiline_string'] = data['multiline_string']
84
+ 'OK'
85
+ end
86
+
62
87
  post '/after_features' do
88
+ data = read_from_request
89
+ min, sec = data['duration'].to_f.divmod(60)
90
+ settings.duration = "#{min}m#{'%.3f' % sec}s"
63
91
  settings.build_status ||= 'passed'
92
+ settings.stats = stats
64
93
  'OK'
65
94
  end
66
-
95
+
67
96
  get('/ping') { 'pong!' }
68
97
  delete('/') { exit! }
69
98
 
@@ -84,6 +113,36 @@ module Cuukie
84
113
  current_scenario['steps'].last
85
114
  end
86
115
 
116
+ def stats
117
+ scenarios = []
118
+ settings.features.each {|feature| scenarios.concat feature['scenarios'] }
119
+
120
+ result = {:scenarios => String.new, :steps => String.new}
121
+ result[:scenarios] << dump_count(scenarios.size, "scenario")
122
+ result[:scenarios] << counts(scenarios)
123
+
124
+ steps = []
125
+ scenarios.each {|scenario| steps.concat scenario['steps'] }
126
+ result[:steps] << dump_count(steps.size, "step")
127
+ step_count = counts steps
128
+ result[:steps] << step_count if step_count
129
+ result
130
+ end
131
+
132
+ # shamelessly ripped from Cucumber's HTML formatter
133
+ def counts(elements)
134
+ counts = ['failed', 'skipped', 'undefined', 'pending', 'passed'].map do |status|
135
+ selected = elements.find_all {|element| element['status'] == status }
136
+ selected.any? ? "#{selected.size} #{status}" : nil
137
+ end.compact
138
+ counts.any? ? " (#{counts.join(', ')})" : ''
139
+ end
140
+
141
+ # also shamelessly ripped from Cucumber's HTML formatter
142
+ def dump_count(count, what, state=nil)
143
+ [count, state, "#{what}#{count == 1 ? '' : 's'}"].compact.join(' ')
144
+ end
145
+
87
146
  include Rack::Utils
88
147
 
89
148
  def read_from_request
@@ -9,7 +9,9 @@
9
9
 
10
10
  <body>
11
11
  <div class="cucumber"><div id="cucumber-header"><div id="label"><h1>Cucumber Features</h1></div>
12
- <div id="summary"><!--<p id="totals"></p><p id="duration"></p>-->
12
+ <div id="summary">
13
+ <p id="stats"></p>
14
+ <p id="duration"></p>
13
15
  <div id="expand-collapse"><p id="expander">Expand All</p><p id="collapser">Collapse All</p></div>
14
16
  </div>
15
17
  </div>
@@ -35,6 +37,20 @@
35
37
  <span class="keyword"><%= step['keyword'] %></span><span class="step val"><%= step['name'] %></span>
36
38
  </div>
37
39
  <div class="step_file"><span><%= step['file_colon_line'] %></span></div>
40
+ <% unless step['table'].empty? %>
41
+ <table>
42
+ <% step['table'].each_with_index do |rowdata, row| %>
43
+ <tr class='step' id='row_-<%= row %>'>
44
+ <% rowdata.each_with_index do |value, col| %>
45
+ <td class="step" id="row_-<%= row %>_<%= col %>"><div><span class="step param"><%= value %></span></div></td>
46
+ <% end %>
47
+ </tr>
48
+ <% end %>
49
+ </table>
50
+ <% end %>
51
+ <% if step['multiline_string'] %>
52
+ <pre class="val"><%= step['multiline_string'] %></pre>
53
+ <% end %>
38
54
  </li>
39
55
  <% end %>
40
56
  </ol>
@@ -42,6 +58,12 @@
42
58
  <% end %>
43
59
  </div>
44
60
  <% end %>
61
+ <script type="text/javascript">
62
+ document.getElementById('duration').innerHTML = "Finished in <strong><%= @duration %> seconds</strong>";
63
+ </script>
64
+ <script type="text/javascript">
65
+ document.getElementById('stats').innerHTML = "<%= @stats[:scenarios] %><br/><%= @stats[:steps] %>";
66
+ </script>
45
67
  </div>
46
68
  </body>
47
69
  </html>
@@ -1,14 +1,65 @@
1
+ require 'spec_helper'
2
+
1
3
  describe "The cuukie_server command" do
2
- it "starts the Cuukie server" do
3
- Process.detach fork { exec "ruby bin/cuukie_server >/dev/null 2>&1" }
4
- response = nil
5
- until !response
6
- begin
7
- response = RestClient.get 'http://localhost:4569/ping'
8
- rescue; end
4
+ it "starts the Cuukie server on port 4569 by default" do
5
+ start_process "ruby bin/cuukie_server >/dev/null 2>&1"
6
+ wait_for_server_on_port 4569
7
+ stop_server_on_port 4569
8
+ end
9
+
10
+ it "starts the Cuukie server on any given port" do
11
+ start_process "ruby bin/cuukie_server 4570 >/dev/null 2>&1"
12
+ wait_for_server_on_port 4570
13
+ stop_server_on_port 4570
14
+ end
15
+ end
16
+
17
+ describe "The cuukie formatter" do
18
+ require 'tempfile'
19
+
20
+ before :each do
21
+ @out = Tempfile.new('cuukie.tmp')
22
+ end
23
+
24
+ after :each do
25
+ @out.delete
26
+ end
27
+
28
+ it "expects a server on localhost:4569 by default" do
29
+ begin
30
+ start_process "ruby bin/cuukie_server 4569 >/dev/null 2>&1"
31
+ wait_for_server_on_port 4569
32
+ cmd = "cd spec/test_project && \
33
+ cucumber features/1_show_scenarios.feature:9 \
34
+ --format cuukie > #{@out.path}"
35
+ system(cmd).should be_true
36
+ @out.read.should == ''
37
+ ensure
38
+ stop_server_on_port 4569
9
39
  end
40
+ end
41
+
42
+ it "can point to a different server" do
43
+ start_process "ruby bin/cuukie_server 4570 >/dev/null 2>&1"
10
44
  begin
11
- RestClient.delete 'http://localhost:4569/'
12
- rescue; end
45
+ wait_for_server_on_port 4570
46
+ cmd = "cd spec/test_project && \
47
+ cucumber features/1_show_scenarios.feature:9 \
48
+ CUUKIE_SERVER=http://localhost:4570 \
49
+ --format cuukie > #{@out.path}"
50
+ system(cmd).should be_true
51
+ @out.read.should == ''
52
+ ensure
53
+ stop_server_on_port 4570
54
+ end
55
+ end
56
+
57
+ it "fails gracefully if the server is down" do
58
+ cmd = "cd spec/test_project && \
59
+ cucumber features/1_show_scenarios.feature:9 \
60
+ CUUKIE_SERVER=http://some.server:4570 \
61
+ --format cuukie > #{@out.path}"
62
+ system(cmd).should be_true
63
+ @out.read.should match 'I cannot find the cuukie_server on http://some.server:4570'
13
64
  end
14
65
  end
@@ -1,26 +1,28 @@
1
+ require 'spec_helper'
2
+
1
3
  describe 'Cuukie' do
2
4
  before(:all) { start_server }
3
- after(:all) { stop_server }
5
+ after(:all) { stop_server_on_port 4569 }
4
6
 
5
- describe 'on the page header' do
7
+ describe 'shows suite result at the top of the page' do
6
8
  it "contains essential information" do
7
9
  run_cucumber
8
10
  html.should match '<h1>Cucumber Features</h1>'
9
11
  html.should match '<title>Cuukie</title>'
10
12
  end
11
13
 
12
- it "is green if all scenarios passed" do
13
- run_cucumber '1_visualize_scenarios.feature:9'
14
+ it "shows green if all scenarios passed" do
15
+ run_cucumber '1_show_scenarios.feature:9'
14
16
  html.should match /passedColors\('cucumber-header'\)/
15
17
  end
16
18
 
17
- it "is red if any scenario failed" do
18
- run_cucumber '1_visualize_scenarios.feature'
19
+ it "shows red if any scenario failed" do
20
+ run_cucumber '1_show_scenarios.feature'
19
21
  html.should match /failedColors\('cucumber-header'\)/
20
22
  end
21
23
 
22
- it "is yellow if no scenarios failed but some are pending" do
23
- run_cucumber '1_visualize_scenarios.feature:19'
24
+ it "shows yellow if no scenarios failed but some are pending" do
25
+ run_cucumber '1_show_scenarios.feature:19'
24
26
  html.should match /pendingColors\('cucumber-header'\)/
25
27
  end
26
28
  end
@@ -48,7 +50,7 @@ describe 'Cuukie' do
48
50
  end
49
51
 
50
52
  it "shows the scenario source position" do
51
- html.should match '>features&#x2F;1_visualize_scenarios.feature:9<'
53
+ html.should match '>features&#x2F;1_show_scenarios.feature:'
52
54
  end
53
55
 
54
56
  it "shows the passed scenarios in green" do
@@ -75,7 +77,7 @@ describe 'Cuukie' do
75
77
  end
76
78
 
77
79
  it "shows the step source position" do
78
- html.should match '>features&#x2F;step_definitions&#x2F;example_steps.rb:4<'
80
+ html.should match '>features&#x2F;step_definitions&#x2F;example_steps.rb:'
79
81
  end
80
82
 
81
83
  it "shows the step status" do
@@ -83,46 +85,27 @@ describe 'Cuukie' do
83
85
  html.should match 'class="step pending"'
84
86
  end
85
87
 
86
- it "escapes step names" do
88
+ it "escapes HTML output" do
87
89
  html.should match 'I pass an &quot;argument&quot;'
88
90
  end
91
+
92
+ it "shows tables in steps" do
93
+ html.should match '<td class="step" id="row_-0_0"><div><span class="step param">x</span></div></td>'
94
+ html.should match '<td class="step" id="row_-2_1"><div><span class="step param">22</span></div></td>'
95
+ end
96
+
97
+ it "shows multiline strings in steps" do
98
+ html.should match '<pre class=\"val\"> Cuukie is sweet!\n Let&#x27;s try it out.</pre>'
99
+ end
100
+
101
+ it "shows total duration" do
102
+ html.should match /Finished in <strong>\d+m\d+\.\d+s seconds<\/strong>/
103
+ end
104
+
105
+ it "shows end-of-features stats" do
106
+ run_cucumber '1_show_scenarios.feature'
107
+ html.should match /3 scenarios \(1 failed, 1 pending, 1 passed\)/
108
+ html.should match /11 steps \(1 failed, 2 skipped, 1 pending, 7 passed\)/
109
+ end
89
110
  end
90
111
  end
91
-
92
- require 'rest-client'
93
-
94
- [:GET, :POST, :PUT, :DELETE].each do |method|
95
- Kernel.send :define_method, method do |*args|
96
- args[0] = "http://localhost:4569#{args[0]}"
97
- RestClient.send method.downcase, *args
98
- end
99
- end
100
-
101
- def start_server
102
- Process.detach fork { exec "ruby bin/cuukie_server >/dev/null 2>&1" }
103
-
104
- # wait until it's up
105
- loop do
106
- begin
107
- GET '/ping'
108
- return
109
- rescue; end
110
- end
111
- end
112
-
113
- def stop_server
114
- # the server dies without replying, so we expect an error here
115
- DELETE '/'
116
- rescue
117
- end
118
-
119
- def html
120
- GET('/').body
121
- end
122
-
123
- def run_cucumber(feature = '')
124
- system "cd spec/test_project &&
125
- cucumber features/#{feature} \
126
- --format cuukie \
127
- --guess"
128
- end
@@ -0,0 +1,43 @@
1
+ require 'bundler/setup'
2
+
3
+ def start_process(command)
4
+ Process.detach fork { exec command }
5
+ end
6
+
7
+ def run_cucumber(feature = '')
8
+ system "cd spec/test_project &&
9
+ cucumber features/#{feature} --format cuukie"
10
+ end
11
+
12
+ require 'rest-client'
13
+
14
+ [:GET, :POST, :PUT, :DELETE].each do |method|
15
+ Kernel.send :define_method, method do |*args|
16
+ args[0] = "http://localhost:4569#{args[0]}"
17
+ RestClient.send method.to_s.downcase, *args
18
+ end
19
+ end
20
+
21
+ def start_server
22
+ start_process "ruby bin/cuukie_server >/dev/null 2>&1"
23
+ wait_for_server_on_port 4569
24
+ end
25
+
26
+ def wait_for_server_on_port(port)
27
+ loop do
28
+ begin
29
+ RestClient.get "http://localhost:#{port}/ping"
30
+ return
31
+ rescue; end
32
+ end
33
+ end
34
+
35
+ def stop_server_on_port(port)
36
+ # the server dies without replying, so we expect an error here
37
+ RestClient.delete "http://localhost:#{port}/"
38
+ rescue
39
+ end
40
+
41
+ def html
42
+ GET('/').body
43
+ end
@@ -4,7 +4,7 @@ Feature: Visualize Scenarios
4
4
  So that I know which steps are not passing
5
5
 
6
6
  Background: Common Steps
7
- Given I do something for every Scenario
7
+ Given I execute a Background step
8
8
 
9
9
  Scenario: Passing Scenario
10
10
  And I do something
@@ -11,5 +11,5 @@ Scenario: Skipped Scenario
11
11
  Then the entire Scenario should be skipped anyway
12
12
 
13
13
  Scenario: Another Skipped Scenario
14
- When I do something
14
+ When I do something else
15
15
  Then the entire Scenario should be skipped anyway
@@ -0,0 +1,19 @@
1
+ Feature:
2
+ As a Cuker
3
+ I want to see multiline arguments in the result
4
+ To see everything about steps
5
+
6
+ Scenario: Show tables
7
+ Given the following table
8
+ | x | y |
9
+ | 1 | 2 |
10
+ | 11 | 22 |
11
+ Then Cuukie should be OK with it
12
+
13
+ Scenario: Show tables
14
+ Given I say
15
+ """
16
+ Cuukie is sweet!
17
+ Let's try it out.
18
+ """
19
+ Then Cuukie should be OK with it
@@ -1,3 +1,6 @@
1
+ Given /^the following table$/ do |table|
2
+ end
3
+
1
4
  When /^I pass an "([^"]*)"$/ do |argument|
2
5
  end
3
6
 
@@ -9,4 +12,13 @@ When /I call a pending Step/ do
9
12
  pending
10
13
  end
11
14
 
12
- Given /^.*$/ do; end
15
+ Given /^I execute a Background step$/ do; end
16
+ Given /^I do something$/ do; end
17
+ When /^I do something else$/ do; end
18
+ Then /^I should see stuff$/ do; end
19
+ Then /^the entire Scenario should pass$/ do; end
20
+ Then /^the entire Scenario should fail$/ do; end
21
+ Then /^the entire Scenario should be pending$/ do; end
22
+ Then /^the entire Scenario should be skipped anyway$/ do; end
23
+ Then /^Cuukie should be OK with it$/ do; end
24
+ Given /^I say$/ do |smart_stuff|; end
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.2
4
+ version: 0.1.3
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-05 00:00:00.000000000 Z
12
+ date: 2011-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
- requirement: &70232862922920 !ruby/object:Gem::Requirement
16
+ requirement: &70255289550100 !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: *70232862922920
24
+ version_requirements: *70255289550100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rest-client
27
- requirement: &70232862922360 !ruby/object:Gem::Requirement
27
+ requirement: &70255289549480 !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: *70232862922360
35
+ version_requirements: *70255289549480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cucumber
38
- requirement: &70232862921760 !ruby/object:Gem::Requirement
38
+ requirement: &70255289548840 !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: *70232862921760
46
+ version_requirements: *70255289548840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70232862921180 !ruby/object:Gem::Requirement
49
+ requirement: &70255289548080 !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: *70232862921180
57
+ version_requirements: *70255289548080
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &70232862920680 !ruby/object:Gem::Requirement
60
+ requirement: &70255289547420 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70232862920680
68
+ version_requirements: *70255289547420
69
69
  description: Shows Cucumber results on a web page as they run.
70
70
  email: paolo.nusco.perrotta@gmail.com
71
71
  executables:
@@ -96,9 +96,11 @@ files:
96
96
  - lib/test.rb
97
97
  - spec/commands_spec.rb
98
98
  - spec/cuukie_spec.rb
99
- - spec/test_project/features/1_visualize_scenarios.feature
99
+ - spec/spec_helper.rb
100
+ - spec/test_project/features/1_show_scenarios.feature
100
101
  - spec/test_project/features/2_multiple_features.feature
101
102
  - spec/test_project/features/3_failed_background.feature
103
+ - spec/test_project/features/4_show_multiline_args.feature
102
104
  - spec/test_project/features/step_definitions/example_steps.rb
103
105
  - spec/test_project/features/support/formatters.rb
104
106
  homepage: http://github.com/nusco/cuukie
@@ -116,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
118
  version: '0'
117
119
  segments:
118
120
  - 0
119
- hash: 375837505569438947
121
+ hash: -2321068096290706559
120
122
  required_rubygems_version: !ruby/object:Gem::Requirement
121
123
  none: false
122
124
  requirements: