Class: Parser2BenchmarkYAML

Inherits:
Bullshit::RepeatCase
  • Object
show all
Defined in:
lib/vendor/json_pure/benchmarks/parser2_benchmark.rb

Instance Method Summary collapse

Instance Method Details

#benchmark_parserObject



138
139
140
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 138

def benchmark_parser
  @result = YAML.load(@json)
end

#generic_reset_methodObject



142
143
144
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 142

def generic_reset_method
  @result == @big or raise "not equal"
end

#setupObject



134
135
136
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 134

def setup
  @big = @json = File.read(File.join(File.dirname(__FILE__), 'ohai.json'))
end