Module: Cell::TestCase::AssertSelect
- Included in:
- Cell::TestCase
- Defined in:
- lib/cell/test_case.rb
Instance Method Summary collapse
-
#assert_select(*args, &block) ⇒ Object
Invokes assert_select on the markup set by the last #invoke.
-
#assert_selector(*args, &block) ⇒ Object
Invokes assert_select for the last argument, the
contentstring.
Instance Method Details
#assert_select(*args, &block) ⇒ Object
Invokes assert_select on the markup set by the last #invoke.
Example:
invoke :latest
assert_select "h1", "The latest and greatest!"
57 58 59 |
# File 'lib/cell/test_case.rb', line 57 def assert_select(*args, &block) super(HTML::Document.new(last_invoke).root, *args, &block) end |
#assert_selector(*args, &block) ⇒ Object
Invokes assert_select for the last argument, the content string.
Example:
assert_selector "h1", "The latest and greatest!", "<h1>The latest and greatest!</h1>"
would be true.
48 49 50 |
# File 'lib/cell/test_case.rb', line 48 def assert_selector(*args, &block) rails_assert_select(HTML::Document.new(args.pop).root, *args, &block) end |