by ksss
Speaker Deck

Slide 1

Slide 1 text

ksss Run your RBS like a testing code. RBS as a Property

Slide 2

Slide 2 text

RBS as a Property ✒ RBS class MyClass def my_method: (Integer, Integer) -> Integer end

Slide 3

Slide 3 text

RBS as a Property 🍎 Property 100.times do int1 = Random.rand(100) int2 = Random.rand(100) result = MyClass.new.my_method(int1, int2) assert_kind_of Integer, result end

Slide 4

Slide 4 text

RBS as a Property ✒🍎

Slide 5

Slide 5 text

RBS as a Property Gener a te test c a se by RBS And execute code a utom a tic a lly

Slide 6

Slide 6 text

https://github.com/ksss/raap This is the RaaP

Slide 7

Slide 7 text

Demo

Slide 8

Slide 8 text

Edit RBS (Add one overload) class MyClass def my_method: (Integer, Integer) -> Integer | (Float, Float) -> Float end

Slide 9

Slide 9 text

You can run RBS instantly!

Slide 10

Slide 10 text

If the RBS is wrong? class MyClass def my_method: (Integer, String) -> Integer end

Slide 11

Slide 11 text

It detects failures and also displays reproduction codes.

Slide 12

Slide 12 text

Support Union type class MyClass def my_method: (0 | 1 | 2, 3 | 4 | 5) -> Integer end

Slide 13

Slide 13 text

Choose one of the Unions and run it. With coverage!

Slide 14

Slide 14 text

RBS as a Property RaaP