Sha256: 9234dd1cb1aa843799b56e428dbdb86ed290474382a77005067843c55e70b923
Contents?: true
Size: 544 Bytes
Versions: 21
Compression:
Stored size: 544 Bytes
Contents
require 'benchmark' require 'tmpdir' path = File.join(Dir.tmpdir, "benchmark_example_spec.rb") File.open(path, 'w') do |f| f.puts %q|describe "something" do| 100.times do |n| f.puts <<-TEXT it "does something #{n}", :focus => true do end TEXT end 100.times do |n| f.puts <<-TEXT it "does something else #{n}" do end TEXT end f.puts %q|end| end n = 1 Benchmark.benchmark do |bm| 3.times do bm.report do n.times do `bin/rspec --tag focus #{path}` end end end end File.delete(path)
Version data entries
21 entries across 21 versions & 2 rubygems