A Test Code Generator for RSpec Users @seratch Kazuhiro Sera
Who am I? Kazuhiro Sera @seratch Gistub (in-house gist) Web developer at M3, Inc.
[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!
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...)
Kickstarter? Of course, No relationship with
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...
Create new spec
Append lacking cases Let’s run with the -f option!
Append lacking cases New!
Apply recursively Specifying directory works recursively.
What it does RDoc::Parser::Ruby is used to extract method name and its parameter names and just write spec files.
Testing for methods? Testing for methods is not perfect & not enough. But this approach is effective enough to start with.
Feedback Still Newborn! Any feedback is much appreciated.