File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -148,21 +148,16 @@ def initialize; end
148
148
assert_equal false , config [ :properties ] [ 'useSSL' ]
149
149
end
150
150
151
- def load_jdbc_mysql
152
- require 'jdbc/mysql'
153
- rescue LoadError
154
- return nil
155
- end
156
-
157
151
end
158
152
159
153
context 'connection (Jdbc::MySQL missing)' do
160
154
161
155
module ::Jdbc ; end
162
156
163
- @@jdbc_mysql = ::Jdbc ::MySQL rescue nil
164
-
157
+ @@jdbc_mysql = false
165
158
def setup
159
+ load_jdbc_mysql
160
+ @@jdbc_mysql = ::Jdbc ::MySQL rescue nil
166
161
::Jdbc . send :remove_const , :MySQL if @@jdbc_mysql
167
162
end
168
163
@@ -224,4 +219,10 @@ def teardown
224
219
225
220
end
226
221
222
+ def load_jdbc_mysql
223
+ require 'jdbc/mysql'
224
+ rescue LoadError
225
+ return nil
226
+ end
227
+
227
228
end if defined? JRUBY_VERSION
You can’t perform that action at this time.
0 commit comments