View Source AssertHTML.DSL (AssertHTML v0.1.3)
Add aditional syntax to passing current context inside block
example-pass-context
Example: pass context
assert_html html, ".container" do
assert_html "form", action: "/users" do
refute_html ".flash_message"
assert_html ".control_group" do
assert_html "label", class: "title", text: ~r{Full name}
assert_html "input", class: "control", type: "text"
end
assert_html("a", text: "Submit", class: "button")
end
assert_html ".user_list" do
assert_html "li"
end
end
example-2-print-current-context-for-debug
Example 2: print current context for debug
assert_html(html, ".selector") do
IO.inspect(assert_html, label: "current context html")
end
Link to this section Summary
Link to this section Functions
Link to this macro
assert_html(context, selector \\ nil, attributes \\ nil, maybe_do_block \\ nil)
View Source (macro)
Link to this macro