README.md in raap-0.1.0 vs README.md in raap-0.2.0

- old
+ new

@@ -10,20 +10,57 @@ The return value of the method is checked to see if it matches the type, if not, the test fails. If you write an RBS, it becomes a test case. -## Installation +## Concept -TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org. +If you has next signature. +```rbs +class Foo +end + +class Bar + def initialize: (foo: Foo) -> void + def f2s: (Float) -> String +end +``` + +Then, RaaP run next testing code automaticaly. + +```rb +describe Bar do + let(:foo) { Foo.new } + let(:bar) { Bar.new(foo: foo) } + + it "#f2s" do + 100.times do |size| + float = Random.rand * size + expect(bar.f2s(float)).to be_a(String) + end + end +end +``` + +If you got a failure? + +- Fix RBS +- Fix implementation of `Bar#f2s` + +Then, you can start loop again. + +Finally, you get the perfect RBS! + +## Installation + Install the gem and add to the application's Gemfile by executing: - $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG + $ bundle add raap If bundler is not being used to manage dependencies, install the gem by executing: - $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG + $ gem install raap ## Usage ``` $ raap 'MyClass' # Run only RBS of MyClass