Skip to content

Commit

Permalink
fix: correct regex in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Sep 20, 2020
1 parent 2a1cdf5 commit 4259e56
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class RandomDecimalGeneratorSpec extends Specification {

def 'handle edge case when digits == 1'() {
expect:
new RandomDecimalGenerator(1).generate([:]).toString() ==~ /^\d/
new RandomDecimalGenerator(1).generate([:]).toString() ==~ /^\d$/
}

def 'handle edge case when digits == 2'() {
expect:
new RandomDecimalGenerator(2).generate([:]).toString() ==~ /^\d\.\d/
new RandomDecimalGenerator(2).generate([:]).toString() ==~ /^\d\.\d$/
}
}

0 comments on commit 4259e56

Please sign in to comment.