Slide 1

Slide 1 text

A Test Code Generator for RSpec Users @seratch Kazuhiro Sera

Slide 2

Slide 2 text

Who am I? Kazuhiro Sera @seratch Gistub (in-house gist) Web developer at M3, Inc.

Slide 3

Slide 3 text

[PR] M3, Inc. No.1 portal site for doctors in Japan. Java, Scala and Ruby! Recently we’re using Ruby on Rails and Fluentd! We need more Rubyists!

Slide 4

Slide 4 text

Main subject Introducing my gem which is named rspec-kickstarter It’s a command line tool that generates RSpec code and kick-starts testing! (when there are no tests...)

Slide 5

Slide 5 text

Kickstarter? Of course, No relationship with

Slide 6

Slide 6 text

Skip messy work! rspec-kickstarter automates messy work before writing specs. create new file, write describe and blocks, create an instance and prepare args to invoke the method, append new cases if absent...

Slide 7

Slide 7 text

Create new spec

Slide 8

Slide 8 text

Append lacking cases Let’s run with the -f option!

Slide 9

Slide 9 text

Append lacking cases New!

Slide 10

Slide 10 text

Apply recursively Specifying directory works recursively.

Slide 11

Slide 11 text

What it does RDoc::Parser::Ruby is used to extract method name and its parameter names and just write spec files.

Slide 12

Slide 12 text

Testing for methods? Testing for methods is not perfect & not enough. But this approach is effective enough to start with.

Slide 13

Slide 13 text

Feedback Still Newborn! Any feedback is much appreciated.

Slide 14

Slide 14 text

Try it now gem install rspec-kickstarter