Reduced User#is_guest?, User#is_admin?, User#is_mod? calls
[punbbonrails.git] / test / test_helper.rb
blobeca7479bef03cde241f8cf96b313c4b71b8fb433
1 ENV["RAILS_ENV"] = "test"
2 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3 require 'test_help'
5 class Test::Unit::TestCase
6   self.use_transactional_fixtures = false
7   self.use_instantiated_fixtures  = false
8   
9   def assert_form(options)
10     assert_tag :tag => 'form', :attributes => {:action => @controller.url_for(options.merge({:only_path => true}))}
11   end
13   def assert_link_to(options)
14     link = @controller.url_for(options.merge({:only_path => true}))
15     p = {:tag => (options[:tag] || 'a'),:attributes => {}}
16     p[:attributes][options[:tag_href] || 'href'] = link
17     assert_tag p
18   end
19 end