Created
September 16, 2016 19:49
-
-
Save claudiob/c55b65624af5f726cf7076fca86e559f to your computer and use it in GitHub Desktop.
Bug: tag dynamic proxy does not accept options with keys as strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails", github: "rails/rails" | |
end | |
require "action_view" | |
require "action_view/helpers" | |
require "minitest/autorun" | |
class TagHelperTest < ActionView::TestCase | |
tests ActionView::Helpers::TagHelper | |
def test_tag_builder_options | |
str = tag.p("class" => "show", :class => "elsewhere") | |
assert_match(/class="show"/, str) | |
assert_match(/class="elsewhere"/, str) | |
# 1) Failure: | |
# TagHelperTest#test_tag_builder_options [tag_builder_error.rb:24]: | |
# Expected /class="show"/ to match "<p class=\"elsewhere\">{"class"=>"show"}</p>". | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment