aruba-jbb 0.2.6.2 → 0.2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +49 -49
- data/aruba-jbb.gemspec +3 -3
- data/lib/aruba/cucumber_steps.rb +3 -3
- metadata +5 -5
data/README.rdoc
CHANGED
@@ -9,8 +9,6 @@ C program, a Java program, a Perl script - anything.
|
|
9
9
|
Aruba may also be used to test complex configuration files for third-party
|
10
10
|
applications where the software itself may not be modified.
|
11
11
|
|
12
|
-
Aruba provides support for testing using various Ruby versions (see below).
|
13
|
-
|
14
12
|
|
15
13
|
== Usage
|
16
14
|
|
@@ -19,7 +17,13 @@ Aruba provides support for testing using various Ruby versions (see below).
|
|
19
17
|
Then, just require the library in one of your Ruby files under
|
20
18
|
<tt>features/support</tt>
|
21
19
|
|
22
|
-
require 'aruba'
|
20
|
+
require 'aruba'
|
21
|
+
|
22
|
+
Note that aruba-jbb and aruba cannot co-exist in the same project in any
|
23
|
+
case so that I have left the library name the same as upstream. This
|
24
|
+
permits switching between the two in Bundler without having to alter env.rb
|
25
|
+
as well. However, as of v-0.2.6.3 you have the option of requiring
|
26
|
+
aruba-jbb instead.
|
23
27
|
|
24
28
|
You now have a bunch of step definitions that you can use in your features.
|
25
29
|
Look at aruba/cucumber_steps.rb to see all the step definitions. Look at
|
@@ -59,30 +63,24 @@ a directory tree containing a <tt>/tmp/</tt> portion then an error is raised
|
|
59
63
|
when trying to clear the contents. For similar reasons, when this is the case
|
60
64
|
the <tt>rebase</tt> method also raises an error.
|
61
65
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
Ruby command line program with specific versions of Ruby (regardless of
|
66
|
-
what Ruby version you're using to invoke Cucumber).
|
66
|
+
Upstream addressed the more limtied problem of locating <code>./bin</code>
|
67
|
+
by adding <code>@bin</code> tag which appends <code>./bin</code> to Cucumber's
|
68
|
+
LOADPATH. This technique is supported by Aruba-jbb as well.
|
67
69
|
|
68
|
-
This is done with the follwoing step definitions:
|
69
70
|
|
70
|
-
|
71
|
-
/^I am using rvm gemset "([^"]*)"$/
|
71
|
+
== Ruby/RVM love
|
72
72
|
|
73
|
-
|
73
|
+
Aruba once had a couple of step definitions to make it easier to test your
|
74
|
+
Ruby command line program with specific versions of Ruby (regardless of
|
75
|
+
what Ruby version you're using to invoke Cucumber). These were removed in
|
76
|
+
upstream's 0.2.2 version and are no longer present in this fork either.
|
77
|
+
The last version of this fork having them was 0.2.6.
|
74
78
|
|
75
|
-
|
79
|
+
To test against specific versions of Ruby using RVM you are advised to use
|
80
|
+
following idiom:
|
76
81
|
|
77
|
-
|
78
|
-
the Ruby version (and gemset if you specified) instead of just <tt>ruby</tt>,
|
79
|
-
which would be the one on your <tt>PATH</tt>, which might not be the one you
|
80
|
-
want. The same goes for commands starting with <tt>bundle</tt>,
|
81
|
-
<tt>cucumber</tt>, <tt>gem</tt>, <tt>jeweler</tt>, <tt>rails</tt>,
|
82
|
-
<tt>rake</tt>, <tt>rspec</tt> and <tt>spec</tt> -
|
83
|
-
they can all be run with a particular Ruby version that you specify.
|
82
|
+
<code>$ rvm 1.9.2,1.8.7 exec cucumber [flags] [arguments] </code>
|
84
83
|
|
85
|
-
See features/running_ruby.feature for examples.
|
86
84
|
|
87
85
|
== Getting more output with tags.
|
88
86
|
|
@@ -97,32 +95,39 @@ tags on individual scenarios, or on a feature. The tags are:
|
|
97
95
|
* <tt>@announce-env</tt> - See environment variables set by Aruba
|
98
96
|
* <tt>@announce</tt> - Does all of the above
|
99
97
|
|
98
|
+
|
100
99
|
== Note on Patches/Pull Requests
|
101
100
|
|
102
101
|
* Fork the project.
|
103
102
|
* Make your feature addition or bug fix.
|
104
|
-
* Add tests for it. This is important so
|
103
|
+
* Add tests for it. This is important so that we do not break it in a
|
105
104
|
future version unintentionally.
|
106
105
|
* Commit, do not mess with rakefile, version, or history.
|
107
106
|
(if you want to have your own version, that is fine but bump
|
108
107
|
version in a commit by itself I can ignore when I pull)
|
109
108
|
* Send me a pull request. Bonus points for topic branches.
|
110
109
|
|
110
|
+
|
111
111
|
== Note on Aruba-JBB Step Definitions
|
112
112
|
|
113
113
|
This fork has extensively refactoried both the API and the Step
|
114
|
-
Definitions. There
|
115
|
-
provided with the parent. Mostly these
|
116
|
-
Aruba-jbb steps more specific so as to
|
117
|
-
with the user's own steps
|
118
|
-
|
119
|
-
|
114
|
+
Definitions. There are some minor syntax differences with the
|
115
|
+
step definitions matchers provided with the parent. Mostly these
|
116
|
+
have to do with making Aruba-jbb steps more specific so as to
|
117
|
+
avoid anticipated collisions with the user's own steps and to
|
118
|
+
regularlize usage. For example <em>do have</em> instead of simply
|
119
|
+
<em>have</em>. Further, except in a very few cases, these step
|
120
|
+
matchers have removed the start of line and end of line anchors
|
121
|
+
together with most of the subject predicates so as to allow more
|
122
|
+
flexible sentence formulation.
|
123
|
+
|
124
|
+
For example, instead of:
|
120
125
|
|
121
126
|
<tt>When /^I have a file named "([^\"]*)"$/ do |file|</tt>
|
122
127
|
|
123
128
|
This fork uses:
|
124
129
|
|
125
|
-
<tt>When /do have a file named "([^\"]*)"$/ do |file|</tt>
|
130
|
+
<tt>When /do(?:es)? have a file named "([^\"]*)"$/ do |file|</tt>
|
126
131
|
|
127
132
|
So in your features you can write this:
|
128
133
|
|
@@ -131,36 +136,31 @@ So in your features you can write this:
|
|
131
136
|
<tt> When we do have a file named "test"</tt>
|
132
137
|
. . .
|
133
138
|
<tt> When they do have a file named "test"</tt>
|
139
|
+
. . .
|
140
|
+
<tt> When the user does have a file named "test"</tt>
|
134
141
|
|
135
142
|
== Note on Aruba-JBB Development Testing
|
136
143
|
|
137
|
-
|
138
|
-
|
139
|
-
RSpec.
|
144
|
+
All previously encountered testing exceptions have been resolved.
|
145
|
+
This version now passes all upstream tests and several more besides.
|
140
146
|
|
141
|
-
There is a problem with loading Ruby libraries from rake which causes
|
142
|
-
Gherkin not to be found by Cucumber when Aruba features are exercised
|
143
|
-
using Rake (<tt>rake</tt> or <tt>rake cucumber</tt>). Nonetheless, all
|
144
|
-
features not using JRuby pass when exercised using <tt>cucumber features</tt>.
|
145
|
-
|
146
|
-
You can contact me at byrnejb@jharte-lyne.ca. I also monitor the
|
147
|
-
cukes@googlegroups.com mailing list.
|
148
147
|
|
149
|
-
== Note on
|
148
|
+
== Note on Aruba (mainline)
|
150
149
|
|
151
150
|
I have renamed this gem since it has now evolved considerably away
|
152
151
|
from the baseline although, in the main, compatiblity between the
|
153
|
-
the two remains quite high
|
154
|
-
|
152
|
+
the two remains quite high for the end-user. Obviously, if you
|
153
|
+
load both Aruba and Aruba-jbb in the same test process then you
|
154
|
+
are going to encounter step matcher collisions. So, do not do that.
|
155
155
|
|
156
|
-
However, Cucumber-Rails v0.3.2 has a dependency on Aruba which will
|
157
|
-
result in the Aruba baseline gem being installed whenever
|
158
|
-
Cucumber-Rails is installed or updated. Therefore the baseline Aruba
|
159
|
-
gem must be removed after updating Cucumber-Rails and the dependency
|
160
|
-
warning ignored.
|
161
156
|
|
162
157
|
== Copyright
|
163
158
|
|
164
|
-
Copyright (c) 2010 Aslak Hellesøy and David Chelimsky.
|
159
|
+
Portions Copyright (c) 2010 Aslak Hellesøy and David Chelimsky.
|
160
|
+
Portions copyright (c) 2010 James B. Byrne.
|
161
|
+
See LICENSE for details.
|
162
|
+
|
163
|
+
== Support
|
165
164
|
|
166
|
-
|
165
|
+
You can contact me at byrnejb@jharte-lyne.ca. I also monitor the
|
166
|
+
cukes@googlegroups.com mailing list.
|
data/aruba-jbb.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{aruba-jbb}
|
5
|
-
s.version = "0.2.6.
|
5
|
+
s.version = "0.2.6.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Aslak Hellesøy", "David Chelimsky", "James B. Byrne"]
|
9
9
|
s.date = %q{2010-09-29}
|
10
|
-
s.description = %q{
|
10
|
+
s.description = %q{Fork of Aruba, Cucumber steps for testing CLI applications.}
|
11
11
|
s.email = %q{cukes@googlegroups.com}
|
12
12
|
s.homepage = %q{http://github.com/byrnejb/aruba}
|
13
13
|
s.rdoc_options = ["--charset=UTF-8"]
|
14
|
-
s.summary = %q{Cucumber steps for external
|
14
|
+
s.summary = %q{Cucumber steps for testing external processes from the CLI}
|
15
15
|
|
16
16
|
s.add_dependency 'cucumber', '~> 0.9.0'
|
17
17
|
s.add_dependency 'background_process' # Can't specify a version - bundler/rubygems chokes on '2.1'
|
data/lib/aruba/cucumber_steps.rb
CHANGED
@@ -56,18 +56,18 @@ When /clean up the working directory/ do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
|
59
|
-
When /do have (?:a|the) directory named "([^\"]*)"$/ do |dir_name|
|
59
|
+
When /do(?:es)? have (?:a|the) directory named "([^\"]*)"$/ do |dir_name|
|
60
60
|
create_dir(dir_name)
|
61
61
|
end
|
62
62
|
|
63
63
|
|
64
|
-
When /do have (?:a|the) file named "([^\"]*)" (?:containing|with):$/ \
|
64
|
+
When /do(?:es)? have (?:a|the) file named "([^\"]*)" (?:containing|with):$/ \
|
65
65
|
do |file_name, file_content|
|
66
66
|
create_file(file_name, file_content)
|
67
67
|
end
|
68
68
|
|
69
69
|
|
70
|
-
When /do have an empty file named "([^\"]*)"$/ do |file_name|
|
70
|
+
When /do(?:es)? have an empty file named "([^\"]*)"$/ do |file_name|
|
71
71
|
create_file(file_name, "")
|
72
72
|
end
|
73
73
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aruba-jbb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 65
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
9
|
- 6
|
10
|
-
-
|
11
|
-
version: 0.2.6.
|
10
|
+
- 3
|
11
|
+
version: 0.2.6.3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- "Aslak Helles\xC3\xB8y"
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
version: 2.0.0.beta.22
|
70
70
|
type: :development
|
71
71
|
version_requirements: *id003
|
72
|
-
description:
|
72
|
+
description: Fork of Aruba, Cucumber steps for testing CLI applications.
|
73
73
|
email: cukes@googlegroups.com
|
74
74
|
executables: []
|
75
75
|
|
@@ -135,7 +135,7 @@ rubyforge_project:
|
|
135
135
|
rubygems_version: 1.3.7
|
136
136
|
signing_key:
|
137
137
|
specification_version: 3
|
138
|
-
summary: Cucumber steps for external
|
138
|
+
summary: Cucumber steps for testing external processes from the CLI
|
139
139
|
test_files:
|
140
140
|
- features/exit_statuses.feature
|
141
141
|
- features/file_system_commands.feature
|