busser-cucumber 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/.travis.yml +11 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +15 -0
- data/README.md +41 -0
- data/Rakefile +20 -0
- data/busser-cucumber.gemspec +32 -0
- data/features/plugin_install_command.feature +11 -0
- data/features/plugin_list_command.feature +8 -0
- data/features/support/env.rb +15 -0
- data/features/test_command.feature +31 -0
- data/lib/busser/cucumber/runner.rb +24 -0
- data/lib/busser/cucumber/version.rb +29 -0
- data/lib/busser/runner_plugin/cucumber.rb +40 -0
- metadata +194 -0
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Author:: Jonathan Hartman (<j@p4nt5.com>)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Jonathan Hartman
|
4
|
+
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
you may not use this file except in compliance with the License.
|
7
|
+
You may obtain a copy of the License at
|
8
|
+
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
See the License for the specific language governing permissions and
|
15
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/busser-cucumber.png)](http://badge.fury.io/rb/busser-cucumber) [![Dependency Status](https://gemnasium.com/RoboticCheese/busser-cucumber.png)](https://gemnasium.com/RoboticCheese/busser-cucumber) [![Build Status](https://travis-ci.org/RoboticCheese/busser-cucumber.png?branch=master)](https://travis-ci.org/RoboticCheese/busser-cucumber) [![Code Climate](https://codeclimate.com/github/RoboticCheese/busser-cucumber.png)](https://codeclimate.com/github/RoboticCheese/busser-cucumber)
|
2
|
+
|
3
|
+
# Busser::Cucumber
|
4
|
+
|
5
|
+
A Busser runner plugin for Cucumber.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
See the [Busser](https://github.com/fnichol/busser) and
|
10
|
+
[Test Kitchen](https://github.com/opscode/test-kitchen) pages for more details.
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
Place test files in [COOKBOOK]/test/integration/[SUITE]/cucumber/
|
15
|
+
|
16
|
+
cookbook
|
17
|
+
-- test
|
18
|
+
-- integration
|
19
|
+
-- default
|
20
|
+
-- cucumber
|
21
|
+
|
22
|
+
## Contributing
|
23
|
+
|
24
|
+
1. Fork it
|
25
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
26
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
27
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
28
|
+
5. Create new Pull Request
|
29
|
+
|
30
|
+
## Authors
|
31
|
+
|
32
|
+
- Author:: Jonathan Hartman (<j@p4nt5.com>)
|
33
|
+
|
34
|
+
Based mostly on work by [Adam Jacob](https://github.com/adamhjk) on
|
35
|
+
[busser-rspec](https://github.com/adamhjk/busser-rspec), in turn based on work
|
36
|
+
done by [Daisuke Higuchi](https://github.com/cl-lab-k) on
|
37
|
+
[busser-serverspec](https://github.com/cl-lab-k/busser-serverspec).
|
38
|
+
|
39
|
+
## License
|
40
|
+
|
41
|
+
Apache 2.0 (see [LICENSE](license.txt)).
|
data/Rakefile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'cane/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
require 'cucumber/rake/task'
|
5
|
+
|
6
|
+
Cane::RakeTask.new
|
7
|
+
|
8
|
+
desc 'Display LOC stats'
|
9
|
+
task :loc do
|
10
|
+
puts "\n## LOC stats"
|
11
|
+
Kernel.system 'countloc -r .'
|
12
|
+
end
|
13
|
+
|
14
|
+
Rubocop::RakeTask.new
|
15
|
+
|
16
|
+
Cucumber::Rake::Task.new
|
17
|
+
|
18
|
+
task 'default' => [:cane, :loc, :rubocop, :cucumber]
|
19
|
+
|
20
|
+
# vim: ai et ts=2 sts=2 sw=2 ft=ruby
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'busser/cucumber/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'busser-cucumber'
|
8
|
+
spec.version = Busser::Cucumber::VERSION
|
9
|
+
spec.authors = ['Jonathan Hartman']
|
10
|
+
spec.email = ['j@p4nt5.com']
|
11
|
+
spec.description = %q{A Busser plugin for Cucumber}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = 'https://github.com/RoboticCheese/busser-cucumber'
|
14
|
+
spec.license = 'Apache 2.0'
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = []
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'busser'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
|
+
spec.add_development_dependency 'cane'
|
26
|
+
spec.add_development_dependency 'rubocop'
|
27
|
+
spec.add_development_dependency 'countloc'
|
28
|
+
spec.add_development_dependency 'aruba'
|
29
|
+
spec.add_development_dependency 'cucumber'
|
30
|
+
end
|
31
|
+
|
32
|
+
# vim: ai et ts=2 sts=2 sw=2 ft=ruby
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Feature: Plugin install command
|
2
|
+
In order to use this plugin
|
3
|
+
As a user of Busser
|
4
|
+
I want to run the postinstall for this plugin
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a test BUSSER_ROOT directory named "busser-cucumber-install"
|
8
|
+
|
9
|
+
Scenario: Running the postinstall generator
|
10
|
+
When I run `busser plugin install busser-cucumber --force-postinstall`
|
11
|
+
Then the exit status should be 0
|
@@ -0,0 +1,8 @@
|
|
1
|
+
Feature: Plugin list command
|
2
|
+
In order to use this plugin
|
3
|
+
As a user of Busser
|
4
|
+
I want to see this plugin in the 'busser plugin list' command
|
5
|
+
|
6
|
+
Scenario: Plugin appears in plugin list command
|
7
|
+
When I successfully run `busser plugin list`
|
8
|
+
Then the output should match /^cucumber\b/
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require 'aruba/cucumber'
|
4
|
+
require 'busser/cucumber'
|
5
|
+
|
6
|
+
Before do
|
7
|
+
@aruba_timeout_seconds = 20
|
8
|
+
end
|
9
|
+
|
10
|
+
After do |s|
|
11
|
+
# Tell Cucumber to quit after this scenario is done - if it failed.
|
12
|
+
# This is useful to inspect the 'tmp/aruba' directory before any other
|
13
|
+
# steps are executed and clear it out.
|
14
|
+
Cucumber.wants_to_quit = true if s.failed?
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Feature: Test command
|
2
|
+
In order to run tests written with Cucumber
|
3
|
+
As a user of Busser
|
4
|
+
I want my tests to run when the Cucumber runner plugin is installed
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given a test BUSSER_ROOT directory named "busser-cucumber-test"
|
8
|
+
When I successfully run `busser plugin install busser-cucumber --force-postinstall`
|
9
|
+
Given a suite directory named "cucumber"
|
10
|
+
|
11
|
+
Scenario: A passing test suite
|
12
|
+
Given a file in suite "cucumber" named "<YOUR_FILE>" with:
|
13
|
+
"""
|
14
|
+
TEST FILE CONTENT
|
15
|
+
|
16
|
+
A good test might be a simple passing statement
|
17
|
+
"""
|
18
|
+
When I run `busser test cucumber`
|
19
|
+
Then I should verify some output for the cucumber plugin
|
20
|
+
And the exit status should be 0
|
21
|
+
|
22
|
+
Scenario: A failing test suite
|
23
|
+
Given a file in suite "cucumber" named "<YOUR_FILE>" with:
|
24
|
+
"""
|
25
|
+
TEST FILE CONTENT
|
26
|
+
|
27
|
+
A good test might be a failing test case, raised exception, etc.
|
28
|
+
"""
|
29
|
+
When I run `busser test cucumber`
|
30
|
+
Then I should verify some output for the cucumber plugin
|
31
|
+
And the exit status should not be 0
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- encoding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# Author:: Jonathan Hartman (<j@p4nt5.com>)
|
5
|
+
#
|
6
|
+
# Copyright (C) 2013, Jonathan Hartman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
|
20
|
+
require 'cucumber/cli/main'
|
21
|
+
|
22
|
+
exit Cucumber::Cli::Main.new(ARGV.dup).execute!
|
23
|
+
|
24
|
+
# vim: ai et ts=2 sts=2 sw=2 ft=ruby
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Author:: Jonathan Hartman (<j@p4nt5.com>)
|
4
|
+
#
|
5
|
+
# Copyright (C) 2013, Jonathan Hartman
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
|
19
|
+
module Busser
|
20
|
+
# A Busser runner for Cucumber
|
21
|
+
#
|
22
|
+
# @author Jonathan Hartman <j@p4nt5.com>
|
23
|
+
#
|
24
|
+
module Cucumber
|
25
|
+
VERSION = '0.1.0'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# vim: ai et ts=2 sts=2 sw=2 ft=ruby
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- encoding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# Author:: Jonathan Hartman (<j@p4nt5.com>)
|
5
|
+
#
|
6
|
+
# Copyright (C) 2013, Jonathan Hartman
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
|
20
|
+
require 'busser/runner_plugin'
|
21
|
+
|
22
|
+
# A Busser runner for Cucumber
|
23
|
+
#
|
24
|
+
# @author Jonathan Hartman <j@p4nt5.com>
|
25
|
+
#
|
26
|
+
class Busser::RunnerPlugin::Cucumber < Busser::RunnerPlugin::Base
|
27
|
+
postinstall do
|
28
|
+
install_gem 'cucumber'
|
29
|
+
end
|
30
|
+
|
31
|
+
def test
|
32
|
+
runner = File.expand_path(File.join(File.dirname(__FILE__),
|
33
|
+
'..',
|
34
|
+
'cucumber',
|
35
|
+
'runner.rb'))
|
36
|
+
run_ruby_script!("#{runner} #{suite_path('cucumber').to_s}")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# vim: ai et ts=2 sts=2 sw=2 ft=ruby
|
metadata
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: busser-cucumber
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Jonathan Hartman
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-10-12 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: busser
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.3'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.3'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
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
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: cane
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rubocop
|
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
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: countloc
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: aruba
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: cucumber
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
description: A Busser plugin for Cucumber
|
143
|
+
email:
|
144
|
+
- j@p4nt5.com
|
145
|
+
executables: []
|
146
|
+
extensions: []
|
147
|
+
extra_rdoc_files: []
|
148
|
+
files:
|
149
|
+
- .gitignore
|
150
|
+
- .travis.yml
|
151
|
+
- CHANGELOG.md
|
152
|
+
- Gemfile
|
153
|
+
- LICENSE.txt
|
154
|
+
- README.md
|
155
|
+
- Rakefile
|
156
|
+
- busser-cucumber.gemspec
|
157
|
+
- features/plugin_install_command.feature
|
158
|
+
- features/plugin_list_command.feature
|
159
|
+
- features/support/env.rb
|
160
|
+
- features/test_command.feature
|
161
|
+
- lib/busser/cucumber/runner.rb
|
162
|
+
- lib/busser/cucumber/version.rb
|
163
|
+
- lib/busser/runner_plugin/cucumber.rb
|
164
|
+
homepage: https://github.com/RoboticCheese/busser-cucumber
|
165
|
+
licenses:
|
166
|
+
- Apache 2.0
|
167
|
+
post_install_message:
|
168
|
+
rdoc_options: []
|
169
|
+
require_paths:
|
170
|
+
- lib
|
171
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
172
|
+
none: false
|
173
|
+
requirements:
|
174
|
+
- - ! '>='
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
179
|
+
requirements:
|
180
|
+
- - ! '>='
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: '0'
|
183
|
+
requirements: []
|
184
|
+
rubyforge_project:
|
185
|
+
rubygems_version: 1.8.23
|
186
|
+
signing_key:
|
187
|
+
specification_version: 3
|
188
|
+
summary: A Busser plugin for Cucumber
|
189
|
+
test_files:
|
190
|
+
- features/plugin_install_command.feature
|
191
|
+
- features/plugin_list_command.feature
|
192
|
+
- features/support/env.rb
|
193
|
+
- features/test_command.feature
|
194
|
+
has_rdoc:
|