kookaburra 0.18.0 → 0.18.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -19,8 +19,8 @@ design flaws that its best just to toss it.
19
19
 
20
20
  ## Installation ##
21
21
 
22
- Kookaburra is available as a Rubygem and [published on Rubygems.org] [Kookaburra
23
- Gem], so installation is trivial:
22
+ Kookaburra is available as a Rubygem and [published on Rubygems.org] [Kookaburra Gem],
23
+ so installation is trivial:
24
24
 
25
25
  gem install kookaburra
26
26
 
@@ -78,6 +78,7 @@ For [RSpec] [RSpec] integration tests, just add the following to
78
78
  :given_driver_class => MyApp::Kookaburra::GivenDriver,
79
79
  :ui_driver_class => MyApp::Kookaburra::UIDriver,
80
80
  :browser => Capybara,
81
+ :rack_app => Capybara.app,
81
82
  :server_error_detection => { |browser|
82
83
  browser.has_css?('head title', :text => 'Internal Server Error')
83
84
  }
@@ -105,6 +106,7 @@ For [Cucumber] [Cucumber], add the following to `features/support/kookaburra_set
105
106
  :given_driver_class => MyApp::Kookaburra::GivenDriver,
106
107
  :ui_driver_class => MyApp::Kookaburra::UIDriver,
107
108
  :browser => Capybara,
109
+ :rack_app => Capybara.app,
108
110
  :server_error_detection => { |browser|
109
111
  browser.has_css?('head title', :text => 'Internal Server Error')
110
112
  }
@@ -307,10 +309,10 @@ Here's a quick example of TestData behavor:
307
309
 
308
310
  test_data = TestData.new
309
311
 
310
- test_data.widgets[:widget_a] = {:name => 'Widget A'}
312
+ test_data.widgets[:widget_a] = {'name' => 'Widget A'}
311
313
 
312
314
  test_data.widgets[:widget_a]
313
- #=> {:name => 'Widget A'}
315
+ #=> {'name' => 'Widget A'}
314
316
 
315
317
  # this will raise a Kookaburra::UnknownKeyError
316
318
  test_data.widgets[:widget_b]
@@ -352,15 +354,15 @@ for your application:
352
354
 
353
355
  class MyApp::Kookaburra::GivenDriver < Kookaburra::GivenDriver
354
356
  def existing_account(nickname)
355
- account_data = {:display_name => 'John Doe', :password => 'a password'}
356
- account_data[:username] = "test-user-#{`uuidgen`.strip}"
357
+ account_data = {'display_name' => 'John Doe', 'password' => 'a password'}
358
+ account_data['username'] = "test-user-#{`uuidgen`.strip}"
357
359
 
358
360
  # use the API to create the account in the application
359
361
  result = api.create_account(account_data)
360
362
 
361
- # merge in the password (since API doesn't return it) and store details
362
- # in the TestData instance
363
- result.merge!(:password => account_data[:password])
363
+ # merge in the password, since API (hopefully!) doesn't return it, and
364
+ # store details in the TestData instance
365
+ result.merge!('password' => account_data['password'])
364
366
  test_data.accounts[nickname] = account_details
365
367
  end
366
368
  end
@@ -381,7 +383,7 @@ your tests against a "remote" server where you would not have access to the
381
383
  application internals. ("Remote" in the sense that it is not in the same Ruby
382
384
  process as your running tests, although it may or may not be on the same
383
385
  machine. Note that this is not currently possible with Kookaburra due to our
384
- current reliance on Rack::Test.)
386
+ reliance on Rack::Test.)
385
387
 
386
388
  #### UI Driver ####
387
389
 
@@ -400,7 +402,7 @@ within your subclass:
400
402
  def sign_in(account_nickname)
401
403
  account = test_data.accounts[account_nickname]
402
404
  sign_in_screen.show
403
- sign_in_screen.submit_login(account[:username], account[:password])
405
+ sign_in_screen.submit_login(account['username'], account['password'])
404
406
  end
405
407
  end
406
408
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.18.0
1
+ 0.18.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.18.0"
8
+ s.version = "0.18.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Wilger", "Sam Livingston-Gray", "Ravi Gadad"]
data/lib/kookaburra.rb CHANGED
@@ -36,11 +36,10 @@ class Kookaburra
36
36
  # application's subclass of {Kookaburra::GivenDriver}
37
37
  # @option options [Class] :ui_driver_class Your application's
38
38
  # subclass of {Kookaburra::UIDriver}
39
- # @option options [Object] :browser The browser driver that Kookaburra will
40
- # interact with to run the tests. It must also respond to the #app method
41
- # and return a Rack application for use with the {Kookaburra::APIDriver}.
42
- # Kookaburra is intended to work with `Capybara::Session` as a browser
43
- # driver, but you could use something else that exposed the same basic API.
39
+ # @option options [Capybara::Session] :browser (optional) The browser driver
40
+ # that Kookaburra will interact with to run the tests.
41
+ # @option options [#call] :rack_app (optional) The Rack application to test
42
+ # against.
44
43
  def initialize(options = {})
45
44
  @api_driver_class = options[:api_driver_class]
46
45
  @given_driver_class = options[:given_driver_class]
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: 87
4
+ hash: 85
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 18
9
- - 0
10
- version: 0.18.0
9
+ - 1
10
+ version: 0.18.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Wilger