mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-19 16:50:12 +01:00
Upgrade Selenium on Rails to r140
This commit is contained in:
parent
156862200b
commit
40074c71ad
117 changed files with 16789 additions and 8867 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue