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 Benchmark::Tms#to_h method #3

Closed
keithrbennett opened this issue Jan 30, 2021 · 3 comments
Closed

Add Benchmark::Tms#to_h method #3

keithrbennett opened this issue Jan 30, 2021 · 3 comments
Labels
invalid This doesn't seem right

Comments

@keithrbennett
Copy link
Contributor

Benchmark::Tms contains a to_a method, but a to_h method would also be useful. I added a to_h method, and a test for it.

When running the test, I found that the test was loading the benchmark code from the Ruby runtime (using require benchmark), so my code changes were ignored. The PR for this issue addresses this by using require_relative instead.

keithrbennett added a commit to keithrbennett/benchmark that referenced this issue Jan 30, 2021
keithrbennett added a commit to keithrbennett/benchmark that referenced this issue Jan 30, 2021
@marcandre
Copy link
Member

How did you run your test?

bundle exec rake test is the correct way and I believe loads the right file.

@marcandre marcandre added the invalid This doesn't seem right label Jan 31, 2021
keithrbennett added a commit to keithrbennett/benchmark that referenced this issue Jan 31, 2021
@keithrbennett keithrbennett changed the title Test file fails to test modified code; add Tms#to_h Add Benchmark::Tms#to_h method Feb 7, 2021
@keithrbennett
Copy link
Contributor Author

@marcandre Is this issue and its associated PR ok now?

@marcandre
Copy link
Member

Thanks for the ping 👍
Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Development

No branches or pull requests

2 participants