Module: Sinatra::Tests::RSpec::SharedSpecs
- Includes:
- Matchers
- Defined in:
- lib/sinatra/tests/rspec/shared_specs.rb
Overview
Shared Specs
DEBUG
-
it_should_behave_like "debug => app.methods"
dumps a list of methods for the current
app
-
it_should_behave_like "debug"
tests the body output for a
<debug>
tag.
RESPONSE
-
it_should_behave_like "HTTP headers"
checks that we got a 200 status (OK), and content-type is
text/html
-
it_should_behave_like "HTML"
checks that we got a 200 status (OK), and content-type is
text/html
-
it_should_behave_like "CSS"
checks that we got a 200 status (OK), and content-type is
text/css
HTML OUTPUT
-
it_should_behave_like "div#main-content"
checks that the page has a
<div id="main-content"></div>
-
it_should_behave_like "div#main-content > h2"
checks that the page has an
<h2>
tag within the<div id="main-content"></div>
ADMIN SECTION
-
it_should_behave_like "div.admin-section-header > div.actions > h4 with HELP"
checks that the page has an…
FORMS
-
it_should_behave_like "forms > faux method > input.hidden"
checks that the page has a form with a
<input type="hidden"...>
tag
Method Summary
Methods included from Matchers
#be_even, #have_a_delete_btn, #have_a_page_header, #have_a_page_title, #have_a_show_btn, #have_a_td_actions, #have_a_ui_btn, #have_a_ui_form_message, #have_an_admin_header, #have_an_edit_btn, #have_an_ui_form_header