kookaburra 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/kookaburra.gemspec +1 -1
- data/lib/kookaburra.rb +9 -1
- data/test/kookaburra_test.rb +12 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/kookaburra.gemspec
CHANGED
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
|
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
|
data/test/kookaburra_test.rb
CHANGED
@@ -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:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 4
|
9
|
+
- 0
|
10
|
+
version: 0.4.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Renewable Funding, LLC
|