File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
modules/lib/src/test/scala/org/uaparser/scala Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ trait ParserSpecBase extends Specification {
12
12
def createFromStream (stream : InputStream ): UserAgentStringParser
13
13
14
14
" Parser should" >> {
15
- val yaml = {
15
+ def yaml () = {
16
16
val maxFileSizeBytes = 5 * 1024 * 1024 // 5 MB
17
17
val loaderOptions = new LoaderOptions ()
18
18
loaderOptions.setCodePointLimit(maxFileSizeBytes)
@@ -21,7 +21,7 @@ trait ParserSpecBase extends Specification {
21
21
22
22
def readCasesConfig (resource : String ): List [Map [String , String ]] = {
23
23
val stream = this .getClass.getResourceAsStream(resource)
24
- val cases = YamlUtil .loadYamlAsMap(stream, yaml)
24
+ val cases = YamlUtil .loadYamlAsMap(stream, yaml() )
25
25
26
26
cases.getOrElse(" test_cases" , List ()).filterNot(_.contains(" js_ua" )).map { config =>
27
27
config.filterNot { case (_, value) => value eq null }
You can’t perform that action at this time.
0 commit comments