Skip to content

Instantly share code, notes, and snippets.

@claudiob
Created September 16, 2016 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudiob/c55b65624af5f726cf7076fca86e559f to your computer and use it in GitHub Desktop.
Save claudiob/c55b65624af5f726cf7076fca86e559f to your computer and use it in GitHub Desktop.
Bug: tag dynamic proxy does not accept options with keys as strings
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\">{&quot;class&quot;=&gt;&quot;show&quot;}</p>".
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment