Remove "scope" method

This commit is contained in:
Norman Clarke 2012-04-27 14:27:14 -03:00
parent a8f3e431c4
commit 7a9fa94bff
1 changed files with 1 additions and 5 deletions

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 } }