Sha256: 81cdf589df4eb7db4d18f7be7c8e3bfa258e5232f845fa95d1aaca6502d36a62

Contents?: true

Size: 623 Bytes

Versions: 1

Compression:

Stored size: 623 Bytes

Contents

# spec-bench

spec-bench is (at the moment) a one-trick dog.

## Usage

To use this, install it as a gem:

    gem install spec-bench
    
Add this in your _spec/spec\_helper.rb_ file as an additional matcher to your config block:

    config.include(Bench::Matchers)
    
You're good to go!

## `run_in`

    lambda { Post.performant_task }.should run_in(3.5.seconds)
    
Here we call `.should` on a `Proc` object and pass it `run_in`. This runs the given `Proc`, benchmarking how long it took. If this was longer than the given time it will error, meaning your `performant_task` isn't quite as performant as you thought.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spec-bench-0.0.0 README.markdown