test/unit/zena/use/refactor_test.rb in zena-0.15.2 vs test/unit/zena/use/refactor_test.rb in zena-0.16.0

- old
+ new

@@ -1,19 +1,20 @@ require 'test_helper' class RefactorTest < Zena::View::TestCase - include Zena::Use::Refactor::ViewMethods # fquote + tests Zena::Use::Refactor::ViewMethods # fquote + def _(k) k end def zen_path(obj, opts) "/#{opts[:lang]}/#{obj.zip}.html" end def test_render_to_string - assert_match 'stupid test 25', render_to_string(:inline=>'stupid <%= "test" %> <%= 5*5 %>') + assert_match 'stupid test 25', render_to_string(:inline=>'stupid <%= "test" %> <%= 5*5 %>') end def test_fsize assert_equal '29 Kb', fsize(29279) assert_equal '502 Kb', fsize(513877) @@ -31,10 +32,10 @@ login(:ant) assert_equal ({:overwrite_params=>{:lang=>'io'}}), change_lang('io') end def test_traductions - session[:lang] = 'en' + visitor.lang = 'en' # we must initialize an url for url_rewriting in 'traductions' @controller.instance_eval { @url = ActionController::UrlRewriter.new( @request, {:controller=>'nodes', :action=>'index'} ) } @node = secure!(Node) { Node.find(nodes_id(:status)) } # en,fr trad = traductions assert_equal 2, trad.size \ No newline at end of file