Sha256: 698d9fbff22043671fb849f4637a462f085f2ac990eb0b268bec8eef4aa44418

Contents?: true

Size: 770 Bytes

Versions: 53

Compression:

Stored size: 770 Bytes

Contents

require 'spec_helper'
require 'parslet/rig/rspec'
require 'pp'
require 'benchmark'

# Uncomment to run performace specs


# describe Shortcode do

#   let(:long_text)   { load_fixture :long_text }
#   let(:parser)      { Shortcode::Parser.new }
#   let(:transformer) { Shortcode::Transformer.new }

#   context "parser" do

#     before { long_text }

#     it "runs quickly" do
#       Benchmark.realtime {
#         parser.parse long_text
#       }.should < 1.5
#     end

#   end

#   context "transformer" do

#     let(:parsed_hash) { parser.parse long_text }

#     before { parsed_hash }

#     it "runs quickly" do
#       Benchmark.realtime {
#         transformer.apply(parsed_hash, additional_attributes: nil)
#       }.should < 0.1
#     end

#   end

# end

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
shortcode-1.2.1 spec/performance_spec.rb
shortcode-1.2.0 spec/performance_spec.rb
virgo-0.3.17 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.16 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.15 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.14 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.13 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.12 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.11 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.10 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.9 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.8 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.7 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.6 vendor/gems/shortcode/spec/performance_spec.rb
shortcode-1.1.1 spec/performance_spec.rb
virgo-0.3.4 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.3 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.2 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3.1 vendor/gems/shortcode/spec/performance_spec.rb
virgo-0.3 vendor/gems/shortcode/spec/performance_spec.rb