Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RaaP
Search
ksss
May 08, 2024
Programming
0
170
RaaP
ksss
May 08, 2024
Tweet
Share
More Decks by ksss
See All by ksss
Railsの型ファイル自動生成における課題と解決
ksss
4
3.7k
RBS generation framework using Rack architecture
ksss
0
6.4k
mrubyでruby/specを走らせてみた結果www
ksss
1
2.4k
Rubyに型があると便利か
ksss
4
4.3k
A New Testing Framework Rgot
ksss
0
1.2k
mruby hacking guide
ksss
7
1.7k
Other Decks in Programming
See All in Programming
ts-morphを使ってコードリプレイスとASTへのハードルを下げる!
nyawach
5
330
freeeのエンジニアが 就活で出そうな コーディングテストを 解説してみる
freee
1
180
Upgrading Legacy to the Latest PHP Version
afilina
PRO
0
100
Slackワークフローで感謝を伝える機能/WiFi 自動接続/Figma to React Component/障害レポート君 Team3@NOT A HOTEL
nakaohiroshi
0
250
JavaScript Closure
asoluka
0
2k
Escolhendo (ou não) o melhor ORM para o seu projeto
andreiacsilva
1
170
[RailsConf Detroit 2024] Ruby on Fails - effective error handling with Rails conventions
talyssonoc
0
300
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
520
Dev ContainersとTestcontainers
bells17
3
100
Next.js App Router
quramy
14
2.3k
RustでAWS Lambda functionをいい感じに書く
taiki45
2
160
Deep Dive into React Stream/Serialize
mugi_uno
4
880
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
61
6.8k
4 Signs Your Business is Dying
shpigford
176
21k
What the flash - Photography Introduction
edds
64
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
22
1.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
261
12k
What's in a price? How to price your products and services
michaelherold
238
11k
BBQ
matthewcrist
80
8.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
12
1.1k
Become a Pro
speakerdeck
PRO
13
4.6k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.7k
Transcript
ksss Run your RBS like a testing code. RBS as
a Property
RBS as a Property ✒ RBS class MyClass def my_method:
(Integer, Integer) -> Integer end
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
RBS as a Property ✒🍎
RBS as a Property Gener a te test c a
se by RBS And execute code a utom a tic a lly
https://github.com/ksss/raap This is the RaaP
Demo
Edit RBS (Add one overload) class MyClass def my_method: (Integer,
Integer) -> Integer | (Float, Float) -> Float end
You can run RBS instantly!
If the RBS is wrong? class MyClass def my_method: (Integer,
String) -> Integer end
It detects failures and also displays reproduction codes.
Support Union type class MyClass def my_method: (0 | 1
| 2, 3 | 4 | 5) -> Integer end
Choose one of the Unions and run it. With coverage!
RBS as a Property RaaP