Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a generator of stdlib test #79

merged 1 commit into from Nov 13, 2019


Copy link

pocke commented Nov 12, 2019

This pull request adds a generator for stdlib test.

$ bundle exec rake 'generate:stdlib_test[Foo]'
Created: test/stdlib/Foo_test.rb

$ cat test/stdlib/Foo_test.rb
class FooTest < StdlibTest
  target Foo
  using hook.refinement

  # def test_method_name
  #   # Call the method
  #   method_name(arg)
  #   method_name(arg, arg2)
  # end

Now we do not have many tests for stdlib. So we need to write many test cases.
I think this generator is helpful for writing test.

@@ -39,7 +46,7 @@ You need two method calls, `target` and `using`.
`using hook.refinement` installs a special instrumentation for stdlib, based on refinements.
And you write the sample programs which calls all of the patterns of overloads.

Note that the instrumentation is based on refinmenets and you need to write all method calls in the unit class definitions.
Note that the instrumentation is based on refinements and you need to write all method calls in the unit class definitions.

This comment has been minimized.

Copy link
@soutaro soutaro merged commit c1fe904 into ruby:master Nov 13, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
@pocke pocke deleted the pocke:test-generator branch Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.