New Version
Sync with Latest Instiki Trunk. Migrate to Rails 1.2.5. Bump version number.
This commit is contained in:
parent
de125367b0
commit
207fb1f7f2
120 changed files with 2592 additions and 662 deletions
|
@ -1,7 +1,7 @@
|
|||
module ActionController
|
||||
module Assertions
|
||||
module DomAssertions
|
||||
# test 2 html strings to be equivalent, i.e. identical up to reordering of attributes
|
||||
# Test two HTML strings for equivalency (e.g., identical up to reordering of attributes)
|
||||
def assert_dom_equal(expected, actual, message="")
|
||||
clean_backtrace do
|
||||
expected_dom = HTML::Document.new(expected).root
|
||||
|
@ -11,7 +11,7 @@ module ActionController
|
|||
end
|
||||
end
|
||||
|
||||
# negated form of +assert_dom_equivalent+
|
||||
# The negated form of +assert_dom_equivalent+.
|
||||
def assert_dom_not_equal(expected, actual, message="")
|
||||
clean_backtrace do
|
||||
expected_dom = HTML::Document.new(expected).root
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module ActionController
|
||||
module Assertions
|
||||
module ModelAssertions
|
||||
# ensures that the passed record is valid by active record standards. returns the error messages if not
|
||||
# Ensures that the passed record is valid by ActiveRecord standards and returns any error messages if it is not.
|
||||
def assert_valid(record)
|
||||
clean_backtrace do
|
||||
assert record.valid?, record.errors.full_messages.join("\n")
|
||||
|
|
|
@ -69,6 +69,7 @@ module ActionController
|
|||
end
|
||||
|
||||
if value.respond_to?(:[]) && value['controller']
|
||||
value['controller'] = value['controller'].to_s
|
||||
if key == :actual && value['controller'].first != '/' && !value['controller'].include?('/')
|
||||
new_controller_path = ActionController::Routing.controller_relative_to(value['controller'], @controller.class.controller_path)
|
||||
value['controller'] = new_controller_path if value['controller'] != new_controller_path && ActionController::Routing.possible_controllers.include?(new_controller_path)
|
||||
|
@ -120,6 +121,7 @@ module ActionController
|
|||
end
|
||||
|
||||
private
|
||||
# Recognizes the route for a given path.
|
||||
def recognized_request_for(path, request_method = nil)
|
||||
path = "/#{path}" unless path.first == '/'
|
||||
|
||||
|
@ -132,6 +134,7 @@ module ActionController
|
|||
request
|
||||
end
|
||||
|
||||
# Proxy to to_param if the object will respond to it.
|
||||
def parameterize(value)
|
||||
value.respond_to?(:to_param) ? value.to_param : value
|
||||
end
|
||||
|
|
|
@ -82,6 +82,7 @@ module ActionController
|
|||
end
|
||||
|
||||
private
|
||||
# Recognizes the route for a given path.
|
||||
def recognized_request_for(path, request_method = nil)
|
||||
path = "/#{path}" unless path.first == '/'
|
||||
|
||||
|
|
|
@ -561,6 +561,8 @@ module ActionController
|
|||
# RJS encodes double quotes and line breaks.
|
||||
unescaped= rjs_string.gsub('\"', '"')
|
||||
unescaped.gsub!('\n', "\n")
|
||||
unescaped.gsub!('\076', '>')
|
||||
unescaped.gsub!('\074', '<')
|
||||
# RJS encodes non-ascii characters.
|
||||
unescaped.gsub!(RJS_PATTERN_UNICODE_ESCAPED_CHAR) {|u| [$1.hex].pack('U*')}
|
||||
unescaped
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue