You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
README shows an example that doesn't work; the second check is ignored; I believe not possible to combine two checks with and.
Steps to reproduce the problem
# test that failsexpect{2 ** 128}.toperform_at_least(1000000000000).ips# expected block to perform at least 1T i/s, but performed only 2.37M (± 11%) i/s# now it passesexpect{2 ** 128}.toperform_under(6).msandperform_at_least(10000).ips# because the second one is equivalent toexpect{2 ** 128}.to(perform_under(6).ms)andperform_at_least(10000).ips
Actual behaviour
Second check is ignored
Expected behaviour
It's probably not possible to compound checks like this, as and is not overloadable; just remove it from README
Describe your environment
OS version: Ubuntu 22.04
Ruby version: 2.3.8
RSpec::Benchmark version: 0.6.0
The text was updated successfully, but these errors were encountered:
You're right the documentation is incorrect. I used to write readme before implementation akin to document-driven development.
The RSpec 3 comes with compound matcher expressions that allow you to use .and and .or matches. So this is the mistake of using regular ruby and in place of a matcher. However, this isn't implemented currently. All the rspec-benchmark matchers would need to include the RSpec::Matchers::Composable module to make this work.
Would you have time to give this a try and see how much effort it would require to implement?
Describe the problem
A brief description of the issue.
README shows an example that doesn't work; the second check is ignored; I believe not possible to combine two checks with
and
.Steps to reproduce the problem
Actual behaviour
Second check is ignored
Expected behaviour
It's probably not possible to compound checks like this, as
and
is not overloadable; just remove it from READMEDescribe your environment
The text was updated successfully, but these errors were encountered: