Sha256: c8a22b3825890be36b392fd565190e92b477236693df667524a01be6bbd60c76
Contents?: true
Size: 852 Bytes
Versions: 25
Compression:
Stored size: 852 Bytes
Contents
@Grab('org.spockframework:spock-core:1.0-groovy-2.4') import spock.lang.* class RomanSpec extends Specification { // register metaclass on Integers def setup() { new Roman() } @Unroll def "can convert arabic #arabic to roman #roman"() { expect: arabic.roman == roman where: arabic | roman 1 | 'I' 2 | 'II' 3 | 'III' 4 | 'IV' 5 | 'V' 6 | 'VI' 9 | 'IX' 27 | 'XXVII' 48 | 'XLVIII' 59 | 'LIX' 93 | 'XCIII' 141 | 'CXLI' 163 | 'CLXIII' 402 | 'CDII' 575 | 'DLXXV' 911 | 'CMXI' 1024 | 'MXXIV' 3000 | 'MMM' } }
Version data entries
25 entries across 25 versions & 1 rubygems