# File test/template/prototype_helper_test.rb, line 80 def _evaluate_assigns_and_ivars() end
# File test/template/prototype_helper_test.rb, line 82 def setup @record = @author = Author.new @article = Article.new super end
# File test/template/prototype_helper_test.rb, line 107 def test_remote_function res = remote_function(:url => authors_path, :with => "'author[name]='+$F('author_name')+'&author[dob]='+$F('author_dob')") assert_equal "new Ajax.Request('/authors', {asynchronous:true, evalScripts:true, parameters:'author[name]='+$F('author_name')+'&author[dob]='+$F('author_dob')})", res assert res.html_safe? end
# File test/template/prototype_helper_test.rb, line 88 def test_update_page old_output_buffer = output_buffer block = Proc.new { |page| page.replace_html('foo', 'bar') } assert_equal create_generator(&block).to_s, update_page(&block) assert_equal old_output_buffer, output_buffer end
# File test/template/prototype_helper_test.rb, line 97 def test_update_page_tag block = Proc.new { |page| page.replace_html('foo', 'bar') } assert_equal javascript_tag(create_generator(&block).to_s), update_page_tag(&block) end
# File test/template/prototype_helper_test.rb, line 102 def test_update_page_tag_with_html_options block = Proc.new { |page| page.replace_html('foo', 'bar') } assert_equal javascript_tag(create_generator(&block).to_s, {:defer => 'true'}), update_page_tag({:defer => 'true'}, &block) end