Upgrade Selenium on Rails to r140

This commit is contained in:
Eric Allen 2009-12-14 11:51:36 -05:00
parent 156862200b
commit 40074c71ad
117 changed files with 16789 additions and 8867 deletions

View file

@ -2,7 +2,9 @@ require File.dirname(__FILE__) + '/test_helper'
class RendererTest < Test::Unit::TestCase
def setup
SeleniumOnRails::PartialsSupport.send(:include, SeleniumOnRails::PathsTestHelper)
@controller = SeleniumController.new
@controller.extend(SeleniumOnRails::PathsTestHelper)
ActionController::Routing::Routes.draw
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@ -20,8 +22,6 @@ END
end
def test_html
get :test_file, :testname => 'html.html'
assert_headers
expected =<<END
<html><head><title>test layout</title></head><body>
<p>Testing plain HTML</p>
@ -32,8 +32,16 @@ END
<p>and it works...</p>
</body></html>
END
File.open(test_path_for('html.html'), 'w+') { |index_file| index_file << expected }
get :test_file, :testname => 'html.html'
assert_headers
assert_text_equal expected, @response.body
end
def test_path_for(name)
"#{File.expand_path(File.dirname(__FILE__) + "/../test_data")}/#{name}"
end
def test_rhtml
get :test_file, :testname => 'rhtml.rhtml'