1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Remove "scope" method

This commit is contained in:
Norman Clarke 2012-04-27 14:27:14 -03:00
parent a8f3e431c4
commit 7a9fa94bff

View file

@ -6,10 +6,6 @@ task :default => :test
CLEAN << %w(pkg doc coverage .yardoc)
def scope(path)
File.join(File.dirname(__FILE__), path)
end
desc "Benchmark Haml against ERb. TIMES=n sets the number of runs, default is 1000."
task :benchmark do
sh "ruby test/benchmark.rb #{ENV['TIMES']}"
@ -91,7 +87,7 @@ task :profile do
require 'ruby-prof'
require 'haml'
file = File.read(scope("test/templates/#{file || 'standard'}.haml"))
file = File.read(File.expand_path("../test/templates/#{file || 'standard'}.haml", __FILE__))
obj = Object.new
Haml::Engine.new(file, :ugly => true).def_method(obj, :render)
result = RubyProf.profile { times.times { obj.render } }