kookaburra 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/README.markdown +391 -0
- data/VERSION +1 -1
- data/kookaburra.gemspec +6 -3
- data/lib/kookaburra.rb +4 -2
- data/lib/kookaburra/given_driver.rb +2 -0
- data/lib/kookaburra/test_data.rb +2 -2
- metadata +28 -14
- data/README.rdoc +0 -19
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,6 +3,7 @@ GEM
|
|
3
3
|
specs:
|
4
4
|
activesupport (3.1.3)
|
5
5
|
multi_json (~> 1.0)
|
6
|
+
bluecloth (2.2.0)
|
6
7
|
git (1.2.5)
|
7
8
|
i18n (0.6.0)
|
8
9
|
jeweler (1.6.4)
|
@@ -33,6 +34,7 @@ PLATFORMS
|
|
33
34
|
|
34
35
|
DEPENDENCIES
|
35
36
|
activesupport (>= 3.0)
|
37
|
+
bluecloth
|
36
38
|
bundler (~> 1.0.0)
|
37
39
|
i18n
|
38
40
|
jeweler (~> 1.6.4)
|
data/README.markdown
ADDED
@@ -0,0 +1,391 @@
|
|
1
|
+
# Kookaburra #
|
2
|
+
|
3
|
+
Kookaburra is a framework for implementing the [Window Driver] [1] pattern in
|
4
|
+
order to keep acceptance tests maintainable.
|
5
|
+
|
6
|
+
## Setup ##
|
7
|
+
|
8
|
+
Kookaburra itself abstracts some common patterns for implementing the Window
|
9
|
+
Driver pattern for tests of Ruby web applications built on [Rack] [2]. You will need
|
10
|
+
to tell Kookaburra which classes contain the specific Domain Driver
|
11
|
+
implementations for your application as well as which driver to use for running
|
12
|
+
the tests (currently only tested with [Capybara] [3]). The details of setting up your
|
13
|
+
Domain Driver layer are discussed below, but in general you will need the
|
14
|
+
following in a locations such as `lib/my_application/kookaburra.rb` (replace
|
15
|
+
`MyApplication` with a module name suitable to your actual application:
|
16
|
+
|
17
|
+
module MyApplication
|
18
|
+
module Kookaburra
|
19
|
+
::Kookaburra.adapter = Capybara
|
20
|
+
|
21
|
+
# Note: the following assigned classes are defined under your
|
22
|
+
# application's namespace, e.g. MyApplication::Kookaburra::APIDriver
|
23
|
+
::Kookaburra.api_driver = APIDriver
|
24
|
+
::Kookaburra.given_driver = GivenDriver
|
25
|
+
::Kookaburra.ui_driver = UIDriver
|
26
|
+
|
27
|
+
::Kookaburra.test_data_setup do
|
28
|
+
provide_collection :accounts
|
29
|
+
# See section on Test Data for more examples of what can go here.
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
### RSpec ###
|
35
|
+
|
36
|
+
For [RSpec] [4] integration tests, just add the following to
|
37
|
+
`spec/support/kookaburra_setup.rb`:
|
38
|
+
|
39
|
+
require 'my_application/kookaburra'
|
40
|
+
|
41
|
+
RSpec.configure do |c|
|
42
|
+
c.include(Kookaburra, :type => :request)
|
43
|
+
end
|
44
|
+
|
45
|
+
### Cucumber ###
|
46
|
+
|
47
|
+
For Cucumber, add the following to `features/support/kookaburra_setup.rb`:
|
48
|
+
|
49
|
+
require 'my_application/kookaburra'
|
50
|
+
|
51
|
+
Kookaburra.adapter = Capybara
|
52
|
+
World(Kookaburra)
|
53
|
+
|
54
|
+
Before do
|
55
|
+
# Ensure that there isn't state-leakage between scenarios
|
56
|
+
kookaburra_reset!
|
57
|
+
end
|
58
|
+
|
59
|
+
This will cause the #api, #given and #ui methods will be available in your
|
60
|
+
Cucumber step definitions.
|
61
|
+
|
62
|
+
## Defining Your Testing DSL ##
|
63
|
+
|
64
|
+
Kookaburra attempts to extract some common patterns that make it easier to use
|
65
|
+
the Window Driver pattern along with various Ruby testing frameworks, but you
|
66
|
+
still need to define your own testing DSL. An acceptance testing stack using
|
67
|
+
Kookaburra has the following four layers:
|
68
|
+
|
69
|
+
1. The **Business Specification Language** (Cucumber scenarios and step definitions)
|
70
|
+
2. The **Domain Driver** (Kookaburra::GivenDriver and Kookaburra::UIDriver)
|
71
|
+
3. The **Window Driver** (Kookaburra::UIDriver::UIComponent)
|
72
|
+
4. The **Application Driver** (Capybara and Rack::Test)
|
73
|
+
|
74
|
+
### The Business Specification Language ###
|
75
|
+
|
76
|
+
The business specification language consists of the highest-level descriptions
|
77
|
+
of a feature that are suitable for sharing with the non/less-technical
|
78
|
+
stakeholders on a project.
|
79
|
+
|
80
|
+
Gherkin is the external DSL used by Cucumber for this purpose, and you might
|
81
|
+
have the following scenario defined for an e-commerce application:
|
82
|
+
|
83
|
+
# purchase_items_in_cart.feature
|
84
|
+
|
85
|
+
Feature: Purchase Items in Cart
|
86
|
+
|
87
|
+
Scenario: Using Existing Billing and Shipping Information
|
88
|
+
|
89
|
+
Given I have an existing account
|
90
|
+
And I have previously specified default payment options
|
91
|
+
And I have previously specified default shipping options
|
92
|
+
And I have an item in my shopping cart
|
93
|
+
|
94
|
+
When I sign in to my account
|
95
|
+
And I choose to check out
|
96
|
+
|
97
|
+
Then I see my order summary
|
98
|
+
And I see that my default payment options will be used
|
99
|
+
And I see that my default shipping options will be used
|
100
|
+
|
101
|
+
Note that the scenario is focused on business concepts versus interface details,
|
102
|
+
i.e. you "choose to check out" rather than "click on the checkout button". If
|
103
|
+
for some reason your e-commerce system was going to be a terminal application
|
104
|
+
rather than a web application, you would not need to change this scenario at
|
105
|
+
all, because the actual business concepts described would not change.
|
106
|
+
|
107
|
+
### The Domain Driver ###
|
108
|
+
|
109
|
+
The Domain Driver layer is where you build up an internal DSL that describes the
|
110
|
+
business concepts of your application at a fairly high level. It consists of
|
111
|
+
three top-level drivers: the `APIDriver` (available via `#api`) for interacting
|
112
|
+
with your application's external API, the `GivenDriver` (available via `#given`)
|
113
|
+
which really just wraps the `APIDriver` and is used to set up state for your
|
114
|
+
tests, and the UIDriver (available via `#given`) for describing the tasks that a
|
115
|
+
user can accomplish with the application.
|
116
|
+
|
117
|
+
Given the Cucumber scenario above, the step definitions call into the Domain
|
118
|
+
Driver layer to interact with your application:
|
119
|
+
|
120
|
+
# step_definitions/various_steps.rb
|
121
|
+
|
122
|
+
Given "I have an existing account" do
|
123
|
+
given.existing_account(:my_account)
|
124
|
+
end
|
125
|
+
|
126
|
+
Given "I have previously specified default payment options" do
|
127
|
+
given.default_payment_options_specified_for(:my_account)
|
128
|
+
end
|
129
|
+
|
130
|
+
Given "I have previously specified default shipping options" do
|
131
|
+
given.default_shipping_options_specified_for(:my_account)
|
132
|
+
end
|
133
|
+
|
134
|
+
Given "I have an item in my shopping cart" do
|
135
|
+
given.an_item_in_my_shopping_cart(:my_account)
|
136
|
+
end
|
137
|
+
|
138
|
+
When "I sign in to my account" do
|
139
|
+
ui.sign_in(:my_account)
|
140
|
+
end
|
141
|
+
|
142
|
+
When "I choose to check out" do
|
143
|
+
ui.choose_to_check_out
|
144
|
+
end
|
145
|
+
|
146
|
+
Then "I see my order summary" do
|
147
|
+
ui.order_summary.should be_visible
|
148
|
+
end
|
149
|
+
|
150
|
+
Then "I see that my default payment options will be used" do
|
151
|
+
ui.order_summary.payment_options.should be_account_default_options
|
152
|
+
end
|
153
|
+
|
154
|
+
Then "I see that my default shipping options will be used" do
|
155
|
+
ui.order_summary.shipping_options.should be_account_default_options
|
156
|
+
end
|
157
|
+
|
158
|
+
The step definitions contain neither explicitly shared state (instance
|
159
|
+
variables) nor any logic branches; they are simply wrappers around calls into
|
160
|
+
the Domain Driver layer. There are a couple of advantages to this approach.
|
161
|
+
First, because step definitions are so simple, it isn't necessary to force *Very
|
162
|
+
Specific Wording* on the business analyst/product owner who is writing the
|
163
|
+
specs. For instance, if she writes "I see a summary of my order" in another
|
164
|
+
scenario, it's not a big deal to have the following in your step definitions (as
|
165
|
+
long as the author of the spec confirms that they really mean the same thing):
|
166
|
+
|
167
|
+
Then "I see my order summary" do
|
168
|
+
ui.order_summary.should be_visible
|
169
|
+
end
|
170
|
+
|
171
|
+
Then "I see a summary of my order" do
|
172
|
+
ui.order_summary.should be_visible
|
173
|
+
end
|
174
|
+
|
175
|
+
The step definitions are nothing more than a natural language reference to an
|
176
|
+
action in the Domain Driver; there is no overwhelming maintenance cost to the
|
177
|
+
slight duplication, and it opens up the capacity for more readable Gherkin
|
178
|
+
specs. The fewer false road blocks you put between your product owner and a
|
179
|
+
written specification, the easier it becomes to ensure her participation in this
|
180
|
+
process.
|
181
|
+
|
182
|
+
The second advantage is that by pushing all of the complexity down into the
|
183
|
+
Domain Driver, it's now trivial to reuse the exact same code in
|
184
|
+
developer-centric integration tests. This ensures you have parity between the
|
185
|
+
way the automated acceptance tests run and any additional testing that the
|
186
|
+
development team needs to add in. You could write the same test using just
|
187
|
+
RSpec as follows:
|
188
|
+
|
189
|
+
# spec/integration/purchase_items_in_cart_spec.rb
|
190
|
+
|
191
|
+
describe "Purchase Items in Cart" do
|
192
|
+
example "Using Existing Billing and Shipping Information" do
|
193
|
+
given.existing_account(:my_account)
|
194
|
+
given.default_payment_options_specified_for(:my_account)
|
195
|
+
given.default_shipping_options_specified_for(:my_account)
|
196
|
+
given.an_item_in_my_shopping_cart(:my_account)
|
197
|
+
|
198
|
+
ui.sign_in(:my_account)
|
199
|
+
ui.choose_to_check_out
|
200
|
+
|
201
|
+
ui.order_summary.should be_visible
|
202
|
+
ui.order_summary.payment_options.should be_account_default_options
|
203
|
+
ui.order_summary.shipping_options.should be_account_default_options
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
Whether in Cucumber step definitions or developer integration tests, you will
|
208
|
+
usually interact only with the GivenDriver and the UIDriver.
|
209
|
+
|
210
|
+
#### TestData ####
|
211
|
+
|
212
|
+
`Kookaburra::TestData` is the component via which the `GivenDriver` and the
|
213
|
+
`UIDriver` share information. For instance, if you create a user account via the
|
214
|
+
`GivenDriver`, you would store the login credentials for that account in the
|
215
|
+
`TestData` instance, so the UIDriver knows what to use when you tell it to
|
216
|
+
`#sign_in`. This is what allows the Cucumber step definitions to remain free
|
217
|
+
from explicitly shared state.
|
218
|
+
|
219
|
+
The `TestData` class can be configured to contain both collections of test data
|
220
|
+
as well as default data that can be used as a starting point for creating new
|
221
|
+
resources in the application. To configure `TestData`, call
|
222
|
+
`Kookaburra.test_data_setup` with a block (usually in your
|
223
|
+
`lib/my_application/kookaburra.rb` file):
|
224
|
+
|
225
|
+
module MyApplication
|
226
|
+
module Kookaburra
|
227
|
+
# ...
|
228
|
+
::Kookaburra.test_data_setup do
|
229
|
+
provide_collection :animals
|
230
|
+
set_default :animal,
|
231
|
+
:name => 'horse'
|
232
|
+
:size => 'large',
|
233
|
+
:number_of_legs => 4
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
Then, in any context where you have an instance of `TestData` (such as in
|
239
|
+
`GivenDriver` or `UIDriver`), you can add/retrieve items to/from collections and
|
240
|
+
access default data:
|
241
|
+
|
242
|
+
class MyApplication::Kookaburra::GivenDriver < Kookaburra::GivenDriver
|
243
|
+
def existing_account(nickname)
|
244
|
+
default_account_data = test_data.default(:account)
|
245
|
+
# do something to create account in application
|
246
|
+
# ...
|
247
|
+
# make the details of the new account available to the rest of the test
|
248
|
+
test_data.accounts[nickname] = account
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
class MyApplication::Kookaburra::UIDriver < Kookaburra::UIDriver
|
253
|
+
def sign_in(account_nickname)
|
254
|
+
# pull stored account details from TestData
|
255
|
+
account_info = test_data.accounts[account_nickname]
|
256
|
+
|
257
|
+
# do something to log in using that account_info
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
#### APIDriver ####
|
262
|
+
|
263
|
+
The `Kookaburra::APIDriver` is used to interact with an application's external
|
264
|
+
web services API. You tell Kookaburra about your API by creating a subclass of
|
265
|
+
`Kookaburra::APIDriver` for your application:
|
266
|
+
|
267
|
+
# lib/my_application/kookaburra/api_driver.rb
|
268
|
+
|
269
|
+
class MyApplication::Kookaburra::APIDriver < Kookaburra::APIDriver
|
270
|
+
def create_account(account_data)
|
271
|
+
post_as_json 'Account', 'api/v1/accounts', :account => account_data
|
272
|
+
hash_from_response_json[:account]
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
#### GivenDriver ####
|
277
|
+
|
278
|
+
The `Kookaburra::GivenDriver` is used to create a particular "preexisting"
|
279
|
+
state within your application's data and ensure you have a handle to that data
|
280
|
+
(when needed) prior to interacting with the UI. Like the `APIDriver`, you will
|
281
|
+
create a subclass of `Kookaburra::GivenDriver` in which you will create part of
|
282
|
+
the Domain Driver DSL for your application:
|
283
|
+
|
284
|
+
# lib/my_application/kookaburra/given_driver.rb
|
285
|
+
|
286
|
+
class MyApplication::Kookaburra::GivenDriver < Kookaburra::GivenDriver
|
287
|
+
def existing_account(nickname)
|
288
|
+
# grab the default account details and add a unique username and
|
289
|
+
# password
|
290
|
+
account_data = test_data.default(:account)
|
291
|
+
account_data[:username] = "test-user-#{`uuidgen`.strip}"
|
292
|
+
account_data[:password] = account_data[:username] + "-password"
|
293
|
+
|
294
|
+
# use the API to create the account in the application
|
295
|
+
account_details = api.create_account(account_data)
|
296
|
+
|
297
|
+
# merge in the password (since API doesn't return it) and store details
|
298
|
+
# in the TestData instance
|
299
|
+
account_details.merge(:password => account_data[:password])
|
300
|
+
test_data.accounts[nickname] = account_details
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
#### UIDriver ####
|
305
|
+
|
306
|
+
`Kookaburra::UIDriver` provides the necessary tools for driving your
|
307
|
+
application's user interface using the Window Driver pattern. You will subclass
|
308
|
+
`Kookaburra::UIDriver` for your application and implement your testing DSL
|
309
|
+
within your subclass:
|
310
|
+
|
311
|
+
# lib/my_application/kookaburra/ui_driver.rb
|
312
|
+
|
313
|
+
class MyApplication::Kookaburra::UIDriver < Kookaburra::UIDriver
|
314
|
+
# makes an instance of MyApplication::Kookaburra::UIDriver::SignInScreen
|
315
|
+
# available via the instance method #sign_in_screen
|
316
|
+
ui_component :sign_in_screen
|
317
|
+
|
318
|
+
def sign_in(account_nickname)
|
319
|
+
account = test_data.accounts[account_nickname]
|
320
|
+
navigate_to :sign_in_screen
|
321
|
+
sign_in_screen.submit_login(account[:username], account[:password])
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
### The Window Driver Layer ###
|
326
|
+
|
327
|
+
While your `GivenDriver` and `UIDriver` provide a DSL that represents actions
|
328
|
+
your users can perform in your application, the [Window Driver] [1] layer describes
|
329
|
+
the individual user interface components that the user interacts with to perform
|
330
|
+
these tasks. By describing each interface component using an OOP approach, it is
|
331
|
+
much easier to maintain your acceptance/integration tests, because the
|
332
|
+
implementation details of each component are captured in a single place. If/when
|
333
|
+
that implementation changes, you can---for example---fix every single test that
|
334
|
+
needs to log a user into the system just by updating the SignInScreen class.
|
335
|
+
|
336
|
+
You describe the various user interface components by sub-classing
|
337
|
+
`Kookaburra::UIDriver::UIComponent`:
|
338
|
+
|
339
|
+
# lib/my_application/ui_driver/sign_in_screen.rb
|
340
|
+
|
341
|
+
class MyApplication::Kookaburra::UIDriver::SignInScreen < Kookaburra::UIDriver::UIComponent
|
342
|
+
component_locator '#new_user_session'
|
343
|
+
component_path '/session/new'
|
344
|
+
|
345
|
+
def username
|
346
|
+
in_component { browser.find('#session_username').value }
|
347
|
+
end
|
348
|
+
|
349
|
+
def username=(new_value)
|
350
|
+
fill_in('#session_username', :with => new_value)
|
351
|
+
end
|
352
|
+
|
353
|
+
def password
|
354
|
+
in_component { browser.find('#session_password').value }
|
355
|
+
end
|
356
|
+
|
357
|
+
def password=(new_value)
|
358
|
+
fill_in('#session_password', :with => new_value)
|
359
|
+
end
|
360
|
+
|
361
|
+
def submit!
|
362
|
+
click_on('Sign In')
|
363
|
+
no_500_error!
|
364
|
+
end
|
365
|
+
|
366
|
+
def submit_login(username, password)
|
367
|
+
self.username = username
|
368
|
+
self.password = password
|
369
|
+
submit!
|
370
|
+
end
|
371
|
+
end
|
372
|
+
|
373
|
+
## Contributing to kookaburra ##
|
374
|
+
|
375
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
376
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
377
|
+
* Fork the project
|
378
|
+
* Start a feature/bugfix branch
|
379
|
+
* Commit and push until you are happy with your contribution
|
380
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
381
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
382
|
+
|
383
|
+
## Copyright ##
|
384
|
+
|
385
|
+
Copyright © 2011 Renewable Funding, LLC. See LICENSE.txt for
|
386
|
+
further details.
|
387
|
+
|
388
|
+
[1]: http://martinfowler.com/eaaDev/WindowDriver.html "Window Driver - Martin Fowler"
|
389
|
+
[2]: http://rack.rubyforge.org/ "Rack: a Ruby Webserver Interface"
|
390
|
+
[3]: https://github.com/jnicklas/capybara "jnicklas/capybara - GitHub"
|
391
|
+
[4]: http://rspec.info "RSpec.info: home"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/kookaburra.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "kookaburra"
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Renewable Funding, LLC"]
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.email = "devteam@renewfund.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
|
-
"README.
|
17
|
+
"README.markdown"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
"Gemfile",
|
23
23
|
"Gemfile.lock",
|
24
24
|
"LICENSE.txt",
|
25
|
-
"README.
|
25
|
+
"README.markdown",
|
26
26
|
"Rakefile",
|
27
27
|
"VERSION",
|
28
28
|
"kookaburra.gemspec",
|
@@ -55,6 +55,7 @@ Gem::Specification.new do |s|
|
|
55
55
|
s.add_runtime_dependency(%q<activesupport>, [">= 3.0"])
|
56
56
|
s.add_runtime_dependency(%q<rack-test>, [">= 0"])
|
57
57
|
s.add_development_dependency(%q<minitest>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<bluecloth>, [">= 0"])
|
58
59
|
s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
|
59
60
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
60
61
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
@@ -65,6 +66,7 @@ Gem::Specification.new do |s|
|
|
65
66
|
s.add_dependency(%q<activesupport>, [">= 3.0"])
|
66
67
|
s.add_dependency(%q<rack-test>, [">= 0"])
|
67
68
|
s.add_dependency(%q<minitest>, [">= 0"])
|
69
|
+
s.add_dependency(%q<bluecloth>, [">= 0"])
|
68
70
|
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
69
71
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
70
72
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
@@ -76,6 +78,7 @@ Gem::Specification.new do |s|
|
|
76
78
|
s.add_dependency(%q<activesupport>, [">= 3.0"])
|
77
79
|
s.add_dependency(%q<rack-test>, [">= 0"])
|
78
80
|
s.add_dependency(%q<minitest>, [">= 0"])
|
81
|
+
s.add_dependency(%q<bluecloth>, [">= 0"])
|
79
82
|
s.add_dependency(%q<yard>, ["~> 0.6.0"])
|
80
83
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
81
84
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
data/lib/kookaburra.rb
CHANGED
@@ -3,8 +3,8 @@ require 'kookaburra/api_driver'
|
|
3
3
|
require 'kookaburra/given_driver'
|
4
4
|
require 'kookaburra/ui_driver'
|
5
5
|
|
6
|
-
# Kookaburra is a framework for implementing the
|
7
|
-
# to keep acceptance tests maintainable.
|
6
|
+
# Kookaburra is a framework for implementing the Window Driver pattern[1] in
|
7
|
+
# order to keep acceptance tests maintainable.
|
8
8
|
#
|
9
9
|
# For RSpec integration tests, just add the following to
|
10
10
|
# `spec/support/kookaburra.rb`:
|
@@ -45,6 +45,8 @@ require 'kookaburra/ui_driver'
|
|
45
45
|
#
|
46
46
|
# (Obviously, the specific methods on #given and #ui are something that will be
|
47
47
|
# unique to your application's domain.)
|
48
|
+
#
|
49
|
+
# [1] http://martinfowler.com/eaaDev/WindowDriver.html
|
48
50
|
module Kookaburra
|
49
51
|
class << self
|
50
52
|
# Provides the default adapter for the Kookaburra library. In most cases,
|
data/lib/kookaburra/test_data.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'active_support/hash_with_indifferent_access'
|
2
2
|
require 'active_support/core_ext/hash'
|
3
3
|
|
4
|
-
# This is the mechanism for sharing state between Cucumber steps.
|
5
|
-
# If you're using instance variables, YOU'RE DOING IT WRONG.
|
6
4
|
module Kookaburra
|
5
|
+
# This is the mechanism for sharing state between Cucumber steps.
|
6
|
+
# If you're using instance variables, YOU'RE DOING IT WRONG.
|
7
7
|
class TestData
|
8
8
|
Defaults = HashWithIndifferentAccess.new
|
9
9
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kookaburra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Renewable Funding, LLC
|
@@ -76,6 +76,20 @@ dependencies:
|
|
76
76
|
requirement: *id004
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
hash: 3
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
name: bluecloth
|
88
|
+
prerelease: false
|
89
|
+
type: :development
|
90
|
+
requirement: *id005
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
79
93
|
none: false
|
80
94
|
requirements:
|
81
95
|
- - ~>
|
@@ -89,9 +103,9 @@ dependencies:
|
|
89
103
|
name: yard
|
90
104
|
prerelease: false
|
91
105
|
type: :development
|
92
|
-
requirement: *
|
106
|
+
requirement: *id006
|
93
107
|
- !ruby/object:Gem::Dependency
|
94
|
-
version_requirements: &
|
108
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
95
109
|
none: false
|
96
110
|
requirements:
|
97
111
|
- - ~>
|
@@ -105,9 +119,9 @@ dependencies:
|
|
105
119
|
name: bundler
|
106
120
|
prerelease: false
|
107
121
|
type: :development
|
108
|
-
requirement: *
|
122
|
+
requirement: *id007
|
109
123
|
- !ruby/object:Gem::Dependency
|
110
|
-
version_requirements: &
|
124
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
111
125
|
none: false
|
112
126
|
requirements:
|
113
127
|
- - ~>
|
@@ -121,9 +135,9 @@ dependencies:
|
|
121
135
|
name: jeweler
|
122
136
|
prerelease: false
|
123
137
|
type: :development
|
124
|
-
requirement: *
|
138
|
+
requirement: *id008
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
|
-
version_requirements: &
|
140
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
127
141
|
none: false
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
@@ -135,9 +149,9 @@ dependencies:
|
|
135
149
|
name: rcov
|
136
150
|
prerelease: false
|
137
151
|
type: :development
|
138
|
-
requirement: *
|
152
|
+
requirement: *id009
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
|
-
version_requirements: &
|
154
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
141
155
|
none: false
|
142
156
|
requirements:
|
143
157
|
- - ~>
|
@@ -151,7 +165,7 @@ dependencies:
|
|
151
165
|
name: reek
|
152
166
|
prerelease: false
|
153
167
|
type: :development
|
154
|
-
requirement: *
|
168
|
+
requirement: *id010
|
155
169
|
description: Cucumber + Capybara = Kookaburra? It made sense at the time.
|
156
170
|
email: devteam@renewfund.com
|
157
171
|
executables: []
|
@@ -160,14 +174,14 @@ extensions: []
|
|
160
174
|
|
161
175
|
extra_rdoc_files:
|
162
176
|
- LICENSE.txt
|
163
|
-
- README.
|
177
|
+
- README.markdown
|
164
178
|
files:
|
165
179
|
- .document
|
166
180
|
- .rvmrc
|
167
181
|
- Gemfile
|
168
182
|
- Gemfile.lock
|
169
183
|
- LICENSE.txt
|
170
|
-
- README.
|
184
|
+
- README.markdown
|
171
185
|
- Rakefile
|
172
186
|
- VERSION
|
173
187
|
- kookaburra.gemspec
|
data/README.rdoc
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
= kookaburra
|
2
|
-
|
3
|
-
Description goes here.
|
4
|
-
|
5
|
-
== Contributing to kookaburra
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
9
|
-
* Fork the project
|
10
|
-
* Start a feature/bugfix branch
|
11
|
-
* Commit and push until you are happy with your contribution
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright (c) 2011 Renewable Funding, LLC. See LICENSE.txt for
|
18
|
-
further details.
|
19
|
-
|