slowhandcuke 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/Gemfile +4 -0
- data/README.md +11 -0
- data/Rakefile +2 -0
- data/example/cucumber.yml +1 -0
- data/example/features/example.feature +10 -0
- data/example/features/step_definitions/example_steps.rb +13 -0
- data/lib/slowhandcuke.rb +1 -0
- data/lib/slowhandcuke/formatter.rb +14 -0
- data/lib/slowhandcuke/version.rb +3 -0
- data/slowhandcuke.gemspec +31 -0
- metadata +91 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
##What is it?
|
2
|
+
SlowHandCuke is a simple cucumber formatter whose sole purpose is to give you feedback on the *currently running* step in the console.
|
3
|
+
|
4
|
+
##Why?
|
5
|
+
With the stock cucumber formatters you only find out which steps are running after they have completed running. If you have slow running tests it can be confusing during a test run if you cannot see the currently running test.
|
6
|
+
|
7
|
+
##SlowHandCuke in action
|
8
|
+
|
9
|
+
[ Check out a 10 second screencast ]( http://www.screencast.com/users/PeteHodgson/folders/Jing/media/9ee39009-0fd1-4850-85b8-8eed8beecd06 ). The second run (with --format pretty) shows what the stock console output looks like *without* SlowHandCuke.
|
10
|
+
|
11
|
+
<object id="scPlayer" class="embeddedObject" width="865" height="684" type="application/x-shockwave-flash" data="http://content.screencast.com/users/PeteHodgson/folders/Jing/media/9ee39009-0fd1-4850-85b8-8eed8beecd06/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/PeteHodgson/folders/Jing/media/9ee39009-0fd1-4850-85b8-8eed8beecd06/jingswfplayer.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/PeteHodgson/folders/Jing/media/9ee39009-0fd1-4850-85b8-8eed8beecd06/FirstFrame.jpg&containerwidth=865&containerheight=684&content=http://content.screencast.com/users/PeteHodgson/folders/Jing/media/9ee39009-0fd1-4850-85b8-8eed8beecd06/00000018.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/PeteHodgson/folders/Jing/media/9ee39009-0fd1-4850-85b8-8eed8beecd06/" /> </object>
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
default: --format 'Slowhandcuke::Formatter'
|
data/lib/slowhandcuke.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'slowhandcuke/formatter'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'cucumber/formatter/pretty'
|
2
|
+
module Slowhandcuke
|
3
|
+
class Formatter < Cucumber::Formatter::Pretty
|
4
|
+
def before_step( step )
|
5
|
+
@io.printf "... #{step.name}"
|
6
|
+
@io.flush
|
7
|
+
end
|
8
|
+
|
9
|
+
def before_step_result( *args )
|
10
|
+
@io.printf "\r"
|
11
|
+
super
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "slowhandcuke/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "slowhandcuke"
|
7
|
+
s.version = Slowhandcuke::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Pete Hodgson"]
|
10
|
+
s.email = ["public@thepete.net"]
|
11
|
+
s.homepage = "http://github.com/moredip/slowhandcuke"
|
12
|
+
s.summary = %q{Cucumber formatter which gives feedback on the currently running step}
|
13
|
+
s.description = %q{Cucumber formatter which gives feedback on the currently running step}
|
14
|
+
|
15
|
+
s.add_dependency "cucumber"
|
16
|
+
|
17
|
+
s.post_install_message = <<-EOS
|
18
|
+
|
19
|
+
*****************************************************************
|
20
|
+
* To use the slowhandcuke formatter, simple add *
|
21
|
+
* --format 'Slowhandcuke::Formatter' *
|
22
|
+
* to your cucumber.yml, Rakefile, or command line call *
|
23
|
+
*****************************************************************
|
24
|
+
|
25
|
+
EOS
|
26
|
+
|
27
|
+
s.files = `git ls-files`.split("\n")
|
28
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
29
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
30
|
+
s.require_paths = ["lib"]
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: slowhandcuke
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
version: 0.0.3
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Pete Hodgson
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-11-07 01:00:00 -07:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: cucumber
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
version: "0"
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
32
|
+
description: Cucumber formatter which gives feedback on the currently running step
|
33
|
+
email:
|
34
|
+
- public@thepete.net
|
35
|
+
executables: []
|
36
|
+
|
37
|
+
extensions: []
|
38
|
+
|
39
|
+
extra_rdoc_files: []
|
40
|
+
|
41
|
+
files:
|
42
|
+
- .gitignore
|
43
|
+
- Gemfile
|
44
|
+
- README.md
|
45
|
+
- Rakefile
|
46
|
+
- example/cucumber.yml
|
47
|
+
- example/features/example.feature
|
48
|
+
- example/features/step_definitions/example_steps.rb
|
49
|
+
- lib/slowhandcuke.rb
|
50
|
+
- lib/slowhandcuke/formatter.rb
|
51
|
+
- lib/slowhandcuke/version.rb
|
52
|
+
- slowhandcuke.gemspec
|
53
|
+
has_rdoc: true
|
54
|
+
homepage: http://github.com/moredip/slowhandcuke
|
55
|
+
licenses: []
|
56
|
+
|
57
|
+
post_install_message: |+
|
58
|
+
|
59
|
+
*****************************************************************
|
60
|
+
* To use the slowhandcuke formatter, simple add *
|
61
|
+
* --format 'Slowhandcuke::Formatter' *
|
62
|
+
* to your cucumber.yml, Rakefile, or command line call *
|
63
|
+
*****************************************************************
|
64
|
+
|
65
|
+
rdoc_options: []
|
66
|
+
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
segments:
|
74
|
+
- 0
|
75
|
+
version: "0"
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
segments:
|
81
|
+
- 0
|
82
|
+
version: "0"
|
83
|
+
requirements: []
|
84
|
+
|
85
|
+
rubyforge_project:
|
86
|
+
rubygems_version: 1.3.6
|
87
|
+
signing_key:
|
88
|
+
specification_version: 3
|
89
|
+
summary: Cucumber formatter which gives feedback on the currently running step
|
90
|
+
test_files: []
|
91
|
+
|