Permalink
Browse files

Don't require libraries we're not testing

  • Loading branch information...
1 parent 33507a3 commit b8d7c289bb9eaa941f7fcfe77155674098a5231e @defunkt defunkt committed Mar 25, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 benchmarks/speed.rb
View
@@ -7,9 +7,9 @@
require 'complex_view'
## erb
-template = File.read(File.dirname(__FILE__) + '/complex.erb')
-
unless ENV['NOERB']
+ template = File.read(File.dirname(__FILE__) + '/complex.erb')
+
erb = ERB.new(template)
erb_scope = ComplexView.new
erb_scope.instance_eval("def render_erb; #{erb.src}; end")
@@ -27,10 +27,10 @@
## haml
-require 'haml'
-template = File.read(File.dirname(__FILE__) + '/complex.haml')
-
unless ENV['NOHAML']
+ require 'haml'
+ template = File.read(File.dirname(__FILE__) + '/complex.haml')
+
haml = Haml::Engine.new(template, :ugly => true)
haml_scope = ComplexView.new
haml.def_method(haml_scope, :render_haml)

0 comments on commit b8d7c28

Please sign in to comment.