Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5600 from carlosantoniodasilva/fix-build-3-0

Fix build for branch 3-0-stable - failing in ruby 1.8.8-p358
  • Loading branch information...
commit 5790269af9583445f76a5c5580609afc1448bcdc 2 parents 3627cfa + 9698312
José Valim josevalim authored
9 actionpack/lib/action_view/testing/resolvers.rb
View
@@ -22,10 +22,11 @@ def query(path, exts, formats)
end
templates = []
- @hash.select { |k,v| k =~ /^#{query}$/ }.each do |path, source|
- handler, format = extract_handler_and_format(path, formats)
- templates << Template.new(source, path, handler,
- :virtual_path => path, :format => format)
+ @hash.each do |_path, source|
+ next unless _path =~ /^#{query}$/
+ handler, format = extract_handler_and_format(_path, formats)
+ templates << Template.new(source, _path, handler,
+ :virtual_path => _path, :format => format)
end
templates.sort_by {|t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size }
24 actionpack/test/controller/new_base/render_rjs_test.rb
View
@@ -4,18 +4,18 @@ module RenderRjs
class BasicController < ActionController::Base
layout "application", :only => :index_respond_to
- self.view_paths = [ActionView::FixtureResolver.new(
- "layouts/application.html.erb" => "",
- "render_rjs/basic/index.js.rjs" => "page[:customer].replace_html render(:partial => 'customer')",
- "render_rjs/basic/index_html.js.rjs" => "page[:customer].replace_html :partial => 'customer'",
- "render_rjs/basic/index_no_js.js.erb" => "<%= render(:partial => 'developer') %>",
- "render_rjs/basic/_customer.js.erb" => "JS Partial",
- "render_rjs/basic/_customer.html.erb" => "HTML Partial",
- "render_rjs/basic/_developer.html.erb" => "HTML Partial",
- "render_rjs/basic/index_locale.js.rjs" => "page[:customer].replace_html :partial => 'customer'",
- "render_rjs/basic/_customer.da.html.erb" => "Danish HTML Partial",
- "render_rjs/basic/_customer.da.js.erb" => "Danish JS Partial"
- )]
+ self.view_paths = [ActionView::FixtureResolver.new(ActiveSupport::OrderedHash[
+ "layouts/application.html.erb" , "",
+ "render_rjs/basic/index.js.rjs" , "page[:customer].replace_html render(:partial => 'customer')",
+ "render_rjs/basic/index_html.js.rjs" , "page[:customer].replace_html :partial => 'customer'",
+ "render_rjs/basic/index_no_js.js.erb" , "<%= render(:partial => 'developer') %>",
+ "render_rjs/basic/_customer.js.erb" , "JS Partial",
+ "render_rjs/basic/_customer.html.erb" , "HTML Partial",
+ "render_rjs/basic/_developer.html.erb" , "HTML Partial",
+ "render_rjs/basic/index_locale.js.rjs" , "page[:customer].replace_html :partial => 'customer'",
+ "render_rjs/basic/_customer.da.html.erb" , "Danish HTML Partial",
+ "render_rjs/basic/_customer.da.js.erb" , "Danish JS Partial"
+ ])]
def index
render
14 actionpack/test/template/form_options_helper_test.rb
View
@@ -921,17 +921,15 @@ def test_option_html_attributes_with_single_element_hash
end
def test_option_html_attributes_with_multiple_element_hash
- assert_dom_equal(
- " class=\"fancy\" onclick=\"alert('Hello World');\"",
- option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ])
- )
+ output = option_html_attributes([ 'foo', 'bar', { :class => 'fancy', 'onclick' => "alert('Hello World');" } ])
+ assert output.include?(" class=\"fancy\"")
+ assert output.include?(" onclick=\"alert('Hello World');\"")
end
def test_option_html_attributes_with_multiple_hashes
- assert_dom_equal(
- " class=\"fancy\" onclick=\"alert('Hello World');\"",
- option_html_attributes([ 'foo', 'bar', { :class => 'fancy' }, { 'onclick' => "alert('Hello World');" } ])
- )
+ output = option_html_attributes([ 'foo', 'bar', { :class => 'fancy' }, { 'onclick' => "alert('Hello World');" } ])
+ assert output.include?(" class=\"fancy\"")
+ assert output.include?(" onclick=\"alert('Hello World');\"")
end
def test_option_html_attributes_with_special_characters
Please sign in to comment.
Something went wrong with that request. Please try again.