-
-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove relative links from README, since they can't work correctly on
github and rubydoc.info. - Fixes #113.
- Loading branch information
1 parent
65d3c4d
commit 17325de
Showing
3 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require 'benchmark' | ||
require 'rspec/expectations' | ||
|
||
include RSpec::Expectations | ||
include RSpec::Matchers | ||
|
||
RSpec::Matchers.define :eq_using_dsl do |expected| | ||
match do |actual| | ||
actual == expected | ||
end | ||
end | ||
|
||
n = 10000 | ||
|
||
Benchmark.benchmark do |bm| | ||
3.times do | ||
bm.report do | ||
n.times do | ||
eq_using_dsl(5).tap do |m| | ||
m.description | ||
m.failure_message_for_should | ||
m.failure_message_for_should_not | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters