kookaburra 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
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.3.1"
8
+ s.version = "0.4.0"
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"]
data/lib/kookaburra.rb CHANGED
@@ -79,6 +79,14 @@ module Kookaburra
79
79
  def ui_driver
80
80
  @ui_driver ||= Kookaburra::UIDriver
81
81
  end
82
+
83
+ # The TestData class that will be used by Kookaburra, typically a subclass of
84
+ # Kookaburra::TestData.
85
+ attr_accessor :test_data
86
+
87
+ def test_data
88
+ @test_data ||= Kookaburra::TestData
89
+ end
82
90
  end
83
91
 
84
92
  # Whatever was set in `Kookaburra.adapter can be overriden in the mixin
@@ -135,7 +143,7 @@ module Kookaburra
135
143
  # The Kookaburra::TestData instance should not be used directly, but all of
136
144
  # the drivers should reference the same instance.
137
145
  def kookaburra_test_data
138
- kookaburra_drivers[:test_data] ||= Kookaburra::TestData.new
146
+ kookaburra_drivers[:test_data] ||= Kookaburra.test_data.new
139
147
  end
140
148
 
141
149
  # Holds references to all drivers in a single hash, so that
@@ -168,5 +168,17 @@ describe Kookaburra do
168
168
  assert_equal Kookaburra::UIDriver, Kookaburra.ui_driver
169
169
  end
170
170
  end
171
+
172
+ describe '#test_data' do
173
+ it 'is a read/write attribute' do
174
+ Kookaburra.test_data = :a_test_data
175
+ assert_equal :a_test_data, Kookaburra.test_data
176
+ end
177
+
178
+ it 'defaults to Kookaburra::TestData' do
179
+ Kookaburra.test_data = nil
180
+ assert_equal Kookaburra::TestData, Kookaburra.test_data
181
+ end
182
+ end
171
183
  end
172
184
  end
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: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Renewable Funding, LLC