Permalink
Browse files

clean up in the test_helper code

  • Loading branch information...
1 parent 3aff362 commit f6d4457cb5595677d1c9c5c6a1fa2007afeea0ac @timcharper committed Jun 12, 2008
Showing with 4 additions and 14 deletions.
  1. +4 −14 test/test_helper.rb
View
@@ -12,22 +12,12 @@ def render_template_with_locals(abs_name, locals = {})
def include_rendered_template(abs_name, locals = {})
code = render_template_with_locals(abs_name, locals)
- eval code, binding, abs_name, 1
+ eval(code, binding, abs_name, 1)
end
-puts include_rendered_template(
- File.join( File.dirname(__FILE__), "../generators/roles/templates", "role_requirement_system.rb.erb"),
+include_rendered_template(
+ File.join( File.dirname(__FILE__), "../generators/roles/templates/role_requirement_system.rb.erb"),
{:users_name => "user" }
)
-for file in ["authenticated_system", "controller_stub.rb", "user_stub.rb"]
- require File.expand_path(File.join(File.dirname(__FILE__), file))
-end
-
-
-
-def dbg
- require 'ruby-debug'
- Debugger.start
- debugger
-end
+%w[authenticated_system controller_stub.rb user_stub.rb].each { |file| require File.expand_path(File.join(File.dirname(__FILE__), file)) }

0 comments on commit f6d4457

Please sign in to comment.