Skip to content

Commit

Permalink
Only Ruby 2.4+ #concat takes multiple args
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Apr 6, 2018
1 parent c54926e commit 7d03122
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/hamlit/engine/attributes_test.rb
Expand Up @@ -12,7 +12,9 @@
it { assert_haml(%q|#a{ id: 'b' }|) }
it { assert_haml(%q|#b{ id: 'a' }|) }
it { assert_haml(%q|%a{ 'id' => 60 }|) }
it { assert_haml(%q|%p{class: "a #{"1".concat "2", "3"}"} foo|) }
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0')
it { assert_haml(%q|%p{class: "a #{"1".concat "2", "3"}"} foo|) }
end

it { assert_haml(%q|#a{ id: 'b' }(id=id)|, locals: { id: 'c' }) }
it { assert_haml(%q|#c{ id: a = 'a' }(id=id)|, locals: { id: 'b' }) }
Expand Down

0 comments on commit 7d03122

Please sign in to comment.