require 'test_helper' class BaseTest < ActiveSupport::TestCase class Context def assigns {} end end def render(&block) ExpressTemplates.render(Context.new, &block) end class UnorderedList < ExpressTemplates::Components::Base tag :ul has_attributes :class => 'something', 'data-foo' => 'something-else' contains { li { "Some stuff" } } end test ".tag_name determines the enclosing tag" do assert_match(/^\