Skip to content

Commit 155e7b3

Browse files
Merge branch 'master' into release-from-root
* master: Use yaml instantiation per example
2 parents 7df07fd + d664ba5 commit 155e7b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/lib/src/test/scala/org/uaparser/scala/ParserSpecBase.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trait ParserSpecBase extends Specification {
1212
def createFromStream(stream: InputStream): UserAgentStringParser
1313

1414
"Parser should" >> {
15-
val yaml = {
15+
def yaml() = {
1616
val maxFileSizeBytes = 5 * 1024 * 1024 // 5 MB
1717
val loaderOptions = new LoaderOptions()
1818
loaderOptions.setCodePointLimit(maxFileSizeBytes)
@@ -21,7 +21,7 @@ trait ParserSpecBase extends Specification {
2121

2222
def readCasesConfig(resource: String): List[Map[String, String]] = {
2323
val stream = this.getClass.getResourceAsStream(resource)
24-
val cases = YamlUtil.loadYamlAsMap(stream, yaml)
24+
val cases = YamlUtil.loadYamlAsMap(stream, yaml())
2525

2626
cases.getOrElse("test_cases", List()).filterNot(_.contains("js_ua")).map { config =>
2727
config.filterNot { case (_, value) => value eq null }

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy