Skip to content

Commit

Permalink
clean up in the test_helper code
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Jun 12, 2008
1 parent 3aff362 commit f6d4457
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions test/test_helper.rb
Expand Up @@ -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.