Pretty specdoc strings
Thank you, vim.
This commit is contained in:
parent
72bd79dc70
commit
8e2419f7d3
@ -8,7 +8,7 @@ describe "checks" do
|
||||
@session.stubs(:response).returns(@response=mock)
|
||||
end
|
||||
|
||||
it "should_fail_if_no_checkbox_found" do
|
||||
it "should fail if no checkbox found" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
</form>
|
||||
@ -17,7 +17,7 @@ describe "checks" do
|
||||
lambda { @session.checks "remember_me" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_fail_if_input_is_not_a_checkbox" do
|
||||
it "should fail if input is not a checkbox" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="text" name="remember_me" />
|
||||
@ -27,7 +27,7 @@ describe "checks" do
|
||||
lambda { @session.checks "remember_me" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_check_rails_style_checkboxes" do
|
||||
it "should check rails style checkboxes" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_tos" name="user[tos]" type="checkbox" value="1" />
|
||||
@ -41,7 +41,7 @@ describe "checks" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_result_in_the_value_on_being_posted_if_not_specified" do
|
||||
it "should result in the value on being posted if not specified" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="checkbox" name="remember_me" />
|
||||
@ -53,7 +53,7 @@ describe "checks" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_result_in_a_custom_value_being_posted" do
|
||||
it "should result in a custom value being posted" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="checkbox" name="remember_me" value="yes" />
|
||||
@ -74,7 +74,7 @@ describe "unchecks" do
|
||||
@session.stubs(:response).returns(@response=mock)
|
||||
end
|
||||
|
||||
it "should_fail_if_no_checkbox_found" do
|
||||
it "should fail if no checkbox found" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
</form>
|
||||
@ -83,7 +83,7 @@ describe "unchecks" do
|
||||
lambda { @session.unchecks "remember_me" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_fail_if_input_is_not_a_checkbox" do
|
||||
it "should fail if input is not a checkbox" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="text" name="remember_me" />
|
||||
@ -93,7 +93,7 @@ describe "unchecks" do
|
||||
lambda { @session.unchecks "remember_me" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_uncheck_rails_style_checkboxes" do
|
||||
it "should uncheck rails style checkboxes" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_tos" name="user[tos]" type="checkbox" value="1" checked="checked" />
|
||||
@ -108,7 +108,7 @@ describe "unchecks" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_result_in_value_not_being_posted" do
|
||||
it "should result in value not being posted" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="checkbox" name="remember_me" value="yes" checked="checked" />
|
||||
@ -119,4 +119,4 @@ describe "unchecks" do
|
||||
@session.unchecks "remember_me"
|
||||
@session.clicks_button
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -8,7 +8,7 @@ describe "chooses" do
|
||||
@session.stubs(:response).returns(@response=mock)
|
||||
end
|
||||
|
||||
it "should_fail_if_no_radio_buttons_found" do
|
||||
it "should fail if no radio buttons found" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
</form>
|
||||
@ -17,7 +17,7 @@ describe "chooses" do
|
||||
lambda { @session.chooses "first option" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_fail_if_input_is_not_a_radio_button" do
|
||||
it "should fail if input is not a radio button" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="text" name="first_option" />
|
||||
@ -27,7 +27,7 @@ describe "chooses" do
|
||||
lambda { @session.chooses "first_option" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_check_rails_style_radio_buttons" do
|
||||
it "should check rails style radio buttons" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_gender_male" name="user[gender]" type="radio" value="M" />
|
||||
@ -42,7 +42,7 @@ describe "chooses" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_only_submit_last_chosen_value" do
|
||||
it "should only submit last chosen value" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_gender_male" name="user[gender]" type="radio" value="M" />
|
||||
@ -58,7 +58,7 @@ describe "chooses" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_result_in_the_value_on_being_posted_if_not_specified" do
|
||||
it "should result in the value on being posted if not specified" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="radio" name="first_option" />
|
||||
@ -70,7 +70,7 @@ describe "chooses" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_result_in_the_value_on_being_posted_if_not_specified_and_checked_by_default" do
|
||||
it "should result in the value on being posted if not specified and checked by default" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="radio" name="first_option" checked="checked"/>
|
||||
@ -80,4 +80,4 @@ describe "chooses" do
|
||||
@session.expects(:post_via_redirect).with("/login", "first_option" => "on")
|
||||
@session.clicks_button
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ describe "clicks_button" do
|
||||
@session.stubs(:response).returns(@response)
|
||||
end
|
||||
|
||||
it "should_fail_if_no_buttons" do
|
||||
it "should fail if no buttons" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login"></form>
|
||||
EOS
|
||||
@ -19,7 +19,7 @@ describe "clicks_button" do
|
||||
lambda { @session.clicks_button }.should raise_error
|
||||
end
|
||||
|
||||
it "should_fail_if_input_is_not_a_submit_button" do
|
||||
it "should fail if input is not a submit button" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input type="reset" />
|
||||
@ -29,7 +29,7 @@ describe "clicks_button" do
|
||||
lambda { @session.clicks_button }.should raise_error
|
||||
end
|
||||
|
||||
it "should_default_to_get_method" do
|
||||
it "should default to get method" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form action="/login">
|
||||
<input type="submit" />
|
||||
@ -39,7 +39,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_assert_valid_response" do
|
||||
it "should assert valid response" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form action="/login">
|
||||
<input type="submit" />
|
||||
@ -49,7 +49,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_default_to_current_url" do
|
||||
it "should default to current url" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get">
|
||||
<input type="submit" />
|
||||
@ -60,7 +60,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_submit_the_first_form_by_default" do
|
||||
it "should submit the first form by default" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/form1">
|
||||
<input type="submit" />
|
||||
@ -73,7 +73,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_not_explode_on_file_fields" do
|
||||
it "should not explode on file fields" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/form1">
|
||||
<input type="file" />
|
||||
@ -83,7 +83,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_submit_the_form_with_the_specified_button" do
|
||||
it "should submit the form with the specified button" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/form1">
|
||||
<input type="submit" />
|
||||
@ -96,7 +96,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button "Form2"
|
||||
end
|
||||
|
||||
it "should_use_action_from_form" do
|
||||
it "should use action from form" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input type="submit" />
|
||||
@ -106,7 +106,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_use_method_from_form" do
|
||||
it "should use method from form" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="submit" />
|
||||
@ -116,7 +116,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_button_as_param_if_it_has_a_name" do
|
||||
it "should send button as param if it has a name" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
@ -127,7 +127,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button("Login")
|
||||
end
|
||||
|
||||
it "should_not_send_button_as_param_if_it_has_no_name" do
|
||||
it "should not send button as param if it has no name" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="submit" name="cancel" value="Cancel" />
|
||||
@ -138,7 +138,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button("Login")
|
||||
end
|
||||
|
||||
it "should_send_default_password_field_values" do
|
||||
it "should send default password field values" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_password" name="user[password]" value="mypass" type="password" />
|
||||
@ -149,7 +149,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_hidden_field_values" do
|
||||
it "should send default hidden field values" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_email" name="user[email]" value="test@example.com" type="hidden" />
|
||||
@ -160,7 +160,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_text_field_values" do
|
||||
it "should send default text field values" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_email" name="user[email]" value="test@example.com" type="text" />
|
||||
@ -171,7 +171,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_checked_fields" do
|
||||
it "should send default checked fields" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_tos" name="user[tos]" value="1" type="checkbox" checked="checked" />
|
||||
@ -182,7 +182,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_radio_options" do
|
||||
it "should send default radio options" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_gender_male" name="user[gender]" type="radio" value="M" />
|
||||
@ -196,7 +196,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_correct_data_for_rails_style_unchecked_fields" do
|
||||
it "should send correct data for rails style unchecked fields" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_tos" name="user[tos]" type="checkbox" value="1" />
|
||||
@ -208,7 +208,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_correct_data_for_rails_style_checked_fields" do
|
||||
it "should send correct data for rails style checked fields" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_tos" name="user[tos]" type="checkbox" value="1" checked="checked" />
|
||||
@ -220,7 +220,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_collection_fields" do
|
||||
it "should send default collection fields" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="checkbox" name="options[]" value="burger" checked="checked" />
|
||||
@ -242,7 +242,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_not_send_default_unchecked_fields" do
|
||||
it "should not send default unchecked fields" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_tos" name="user[tos]" value="1" type="checkbox" />
|
||||
@ -253,7 +253,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_textarea_values" do
|
||||
it "should send default textarea values" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/posts">
|
||||
<textarea name="post[body]">Post body here!</textarea>
|
||||
@ -264,7 +264,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_selected_option_value_from_select" do
|
||||
it "should send default selected option value from select" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<select name="month">
|
||||
@ -278,7 +278,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_selected_option_inner_html_from_select_when_no_value_attribute" do
|
||||
it "should send default selected option inner html from select when no value attribute" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<select name="month">
|
||||
@ -292,7 +292,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_first_select_option_value_when_no_option_selected" do
|
||||
it "should send first select option value when no option selected" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<select name="month">
|
||||
@ -306,7 +306,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_handle_nested_properties" do
|
||||
it "should handle nested properties" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input type="text" id="contestant_scores_12" name="contestant[scores][1]" value="2"/>
|
||||
@ -318,7 +318,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_default_empty_text_field_values" do
|
||||
it "should send default empty text field values" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_email" name="user[email]" value="" type="text" />
|
||||
@ -329,7 +329,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_recognize_button_tags" do
|
||||
it "should recognize button tags" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_email" name="user[email]" value="" type="text" />
|
||||
@ -340,7 +340,7 @@ describe "clicks_button" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_recognize_button_tags_by_content" do
|
||||
it "should recognize button tags by content" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<input id="user_email" name="user[email]" value="" type="text" />
|
||||
|
@ -8,7 +8,7 @@ describe "clicks_link" do
|
||||
@session.stubs(:response).returns(@response=mock)
|
||||
end
|
||||
|
||||
it "should_use_get_by_default" do
|
||||
it "should use get by default" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">Link text</a>
|
||||
EOS
|
||||
@ -16,7 +16,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Link text"
|
||||
end
|
||||
|
||||
it "should_click_get_links" do
|
||||
it "should click get links" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">Link text</a>
|
||||
EOS
|
||||
@ -24,7 +24,7 @@ describe "clicks_link" do
|
||||
@session.clicks_get_link "Link text"
|
||||
end
|
||||
|
||||
it "should_click_delete_links" do
|
||||
it "should click delete links" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">Link text</a>
|
||||
EOS
|
||||
@ -32,7 +32,7 @@ describe "clicks_link" do
|
||||
@session.clicks_delete_link "Link text"
|
||||
end
|
||||
|
||||
it "should_click_post_links" do
|
||||
it "should click post links" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">Link text</a>
|
||||
EOS
|
||||
@ -40,7 +40,7 @@ describe "clicks_link" do
|
||||
@session.clicks_post_link "Link text"
|
||||
end
|
||||
|
||||
it "should_click_put_links" do
|
||||
it "should click put links" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">Link text</a>
|
||||
EOS
|
||||
@ -48,7 +48,7 @@ describe "clicks_link" do
|
||||
@session.clicks_put_link "Link text"
|
||||
end
|
||||
|
||||
it "should_click_rails_javascript_links_with_authenticity_tokens" do
|
||||
it "should click rails javascript links with authenticity tokens" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/posts" onclick="var f = document.createElement('form');
|
||||
f.style.display = 'none';
|
||||
@ -67,7 +67,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Posts"
|
||||
end
|
||||
|
||||
it "should_click_rails_javascript_delete_links" do
|
||||
it "should click rails javascript delete links" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/posts/1" onclick="var f = document.createElement('form');
|
||||
f.style.display = 'none';
|
||||
@ -86,7 +86,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Delete"
|
||||
end
|
||||
|
||||
it "should_click_rails_javascript_post_links" do
|
||||
it "should click rails javascript post links" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/posts" onclick="var f = document.createElement('form');
|
||||
f.style.display = 'none';
|
||||
@ -100,7 +100,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Posts"
|
||||
end
|
||||
|
||||
it "should_click_rails_javascript_put_links" do
|
||||
it "should click rails javascript put links" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/posts" onclick="var f = document.createElement('form');
|
||||
f.style.display = 'none';
|
||||
@ -119,7 +119,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Put"
|
||||
end
|
||||
|
||||
it "should_assert_valid_response" do
|
||||
it "should assert valid response" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">Link text</a>
|
||||
EOS
|
||||
@ -127,7 +127,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Link text"
|
||||
end
|
||||
|
||||
it "should_not_be_case_sensitive" do
|
||||
it "should not be case sensitive" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">Link text</a>
|
||||
EOS
|
||||
@ -135,7 +135,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "LINK TEXT"
|
||||
end
|
||||
|
||||
it "should_match_link_substrings" do
|
||||
it "should match link substrings" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page">This is some cool link text, isn't it?</a>
|
||||
EOS
|
||||
@ -143,7 +143,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Link text"
|
||||
end
|
||||
|
||||
it "should_work_with_elements_in_the_link" do
|
||||
it "should work with elements in the link" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page"><span>Link text</span></a>
|
||||
EOS
|
||||
@ -151,7 +151,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Link text"
|
||||
end
|
||||
|
||||
it "should_match_the_first_matching_link" do
|
||||
it "should match the first matching link" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page1">Link text</a>
|
||||
<a href="/page2">Link text</a>
|
||||
@ -160,7 +160,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Link text"
|
||||
end
|
||||
|
||||
it "should_choose_the_shortest_link_text_match" do
|
||||
it "should choose the shortest link text match" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page1">Linkerama</a>
|
||||
<a href="/page2">Link</a>
|
||||
@ -170,7 +170,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Link"
|
||||
end
|
||||
|
||||
it "should_click_link_within_a_selector" do
|
||||
it "should click link within a selector" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="/page1">Link</a>
|
||||
<div id="container">
|
||||
@ -182,7 +182,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link_within "#container", "Link"
|
||||
end
|
||||
|
||||
it "should_not_make_request_when_link_is_local_anchor" do
|
||||
it "should not make request when link is local anchor" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="#section-1">Jump to Section 1</a>
|
||||
EOS
|
||||
@ -191,7 +191,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Jump to Section 1"
|
||||
end
|
||||
|
||||
it "should_follow_relative_links" do
|
||||
it "should follow relative links" do
|
||||
@session.current_page.stubs(:url).returns("/page")
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="sub">Jump to sub page</a>
|
||||
@ -200,7 +200,7 @@ describe "clicks_link" do
|
||||
@session.clicks_link "Jump to sub page"
|
||||
end
|
||||
|
||||
it "should_follow_query_parameters" do
|
||||
it "should follow query parameters" do
|
||||
@session.current_page.stubs(:url).returns("/page")
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<a href="?foo=bar">Jump to foo bar</a>
|
||||
|
@ -8,7 +8,7 @@ describe "fills_in" do
|
||||
@session.stubs(:response).returns(@response=mock)
|
||||
end
|
||||
|
||||
it "should_work_with_textareas" do
|
||||
it "should work with textareas" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="user_text">User Text</label>
|
||||
@ -21,7 +21,7 @@ describe "fills_in" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_work_with_password_fields" do
|
||||
it "should work with password fields" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input id="user_text" name="user[text]" type="password" />
|
||||
@ -33,7 +33,7 @@ describe "fills_in" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_fail_if_input_not_found" do
|
||||
it "should fail if input not found" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
</form>
|
||||
@ -42,7 +42,7 @@ describe "fills_in" do
|
||||
lambda { @session.fills_in "Email", :with => "foo@example.com" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_allow_overriding_default_form_values" do
|
||||
it "should allow overriding default form values" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="user_email">Email</label>
|
||||
@ -55,7 +55,7 @@ describe "fills_in" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_choose_the_shortest_label_match" do
|
||||
it "should choose the shortest label match" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="user_mail1">Some other mail</label>
|
||||
@ -71,7 +71,7 @@ describe "fills_in" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_choose_the_first_label_match_if_closest_is_a_tie" do
|
||||
it "should choose the first label match if closest is a tie" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="user_mail1">Some mail one</label>
|
||||
@ -87,7 +87,7 @@ describe "fills_in" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_anchor_label_matches_to_start_of_label" do
|
||||
it "should anchor label matches to start of label" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="user_email">Some mail</label>
|
||||
@ -98,7 +98,7 @@ describe "fills_in" do
|
||||
lambda { @session.fills_in "mail", :with => "value" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_anchor_label_matches_to_word_boundaries" do
|
||||
it "should anchor label matches to word boundaries" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="user_email">Emailtastic</label>
|
||||
@ -109,7 +109,7 @@ describe "fills_in" do
|
||||
lambda { @session.fills_in "Email", :with => "value" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_work_with_inputs_nested_in_labels" do
|
||||
it "should work with inputs nested in labels" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label>
|
||||
@ -124,7 +124,7 @@ describe "fills_in" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_work_with_full_input_names" do
|
||||
it "should work with full input names" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<input id="user_email" name="user[email]" type="text" />
|
||||
@ -136,7 +136,7 @@ describe "fills_in" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_work_with_symbols" do
|
||||
it "should work with symbols" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="user_email">Email</label>
|
||||
|
@ -12,13 +12,13 @@ describe "reloads" do
|
||||
@response.stubs(:body).returns("")
|
||||
end
|
||||
|
||||
it "should_reload_the_page" do
|
||||
it "should reload the page" do
|
||||
@session.expects(:get_via_redirect).with("/", {}).times(2)
|
||||
@session.visits("/")
|
||||
@session.reloads
|
||||
end
|
||||
|
||||
it "should_not_request_page_if_not_visited_any_page" do
|
||||
it "should not request page if not visited any page" do
|
||||
@session.expects(:get_via_redirect).never
|
||||
@session.reloads
|
||||
end
|
||||
|
@ -8,7 +8,7 @@ describe "selects" do
|
||||
@session.stubs(:response).returns(@response=mock)
|
||||
end
|
||||
|
||||
it "should_fail_if_option_not_found" do
|
||||
it "should fail if option not found" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<select name="month"><option value="1">January</option></select>
|
||||
@ -18,7 +18,7 @@ describe "selects" do
|
||||
lambda { @session.selects "February", :from => "month" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_fail_if_option_not_found_in_list_specified_by_element_name" do
|
||||
it "should fail if option not found in list specified by element name" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<select name="month"><option value="1">January</option></select>
|
||||
@ -29,7 +29,7 @@ describe "selects" do
|
||||
lambda { @session.selects "February", :from => "year" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_fail_if_specified_list_not_found" do
|
||||
it "should fail if specified list not found" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="get" action="/login">
|
||||
<select name="month"><option value="1">January</option></select>
|
||||
@ -39,7 +39,7 @@ describe "selects" do
|
||||
lambda { @session.selects "February", :from => "year" }.should raise_error
|
||||
end
|
||||
|
||||
it "should_send_value_from_option" do
|
||||
it "should send value from option" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<select name="month"><option value="1">January</option></select>
|
||||
@ -51,7 +51,7 @@ describe "selects" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_work_with_empty_select_lists" do
|
||||
it "should work with empty select lists" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<select name="month"></select>
|
||||
@ -62,7 +62,7 @@ describe "selects" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_work_without_specifying_the_field_name_or_label" do
|
||||
it "should work without specifying the field name or label" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<select name="month"><option value="1">January</option></select>
|
||||
@ -74,7 +74,7 @@ describe "selects" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_value_from_option_in_list_specified_by_name" do
|
||||
it "should send value from option in list specified by name" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<select name="start_month"><option value="s1">January</option></select>
|
||||
@ -87,7 +87,7 @@ describe "selects" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_send_value_from_option_in_list_specified_by_label" do
|
||||
it "should send value from option in list specified by label" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="start_month">Start Month</label>
|
||||
@ -102,7 +102,7 @@ describe "selects" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_use_option_text_if_no_value" do
|
||||
it "should use option text if no value" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<select name="month"><option>January</option></select>
|
||||
@ -114,7 +114,7 @@ describe "selects" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_find_option_by_regexp" do
|
||||
it "should find option by regexp" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<select name="month"><option>January</option></select>
|
||||
@ -126,7 +126,7 @@ describe "selects" do
|
||||
@session.clicks_button
|
||||
end
|
||||
|
||||
it "should_find_option_by_regexp_in_list_specified_by_label" do
|
||||
it "should find option by regexp in list specified by label" do
|
||||
@response.stubs(:body).returns(<<-EOS)
|
||||
<form method="post" action="/login">
|
||||
<label for="start_month">Start Month</label>
|
||||
|
@ -12,17 +12,17 @@ describe "visits" do
|
||||
@response.stubs(:body).returns("")
|
||||
end
|
||||
|
||||
it "should_use_get" do
|
||||
it "should use get" do
|
||||
@session.expects(:get_via_redirect).with("/", {})
|
||||
@session.visits("/")
|
||||
end
|
||||
|
||||
it "should_assert_valid_response" do
|
||||
it "should assert valid response" do
|
||||
@session.expects(:assert_response).with(:success)
|
||||
@session.visits("/")
|
||||
end
|
||||
|
||||
it "should_require_a_visit_before_manipulating_page" do
|
||||
it "should require a visit before manipulating page" do
|
||||
lambda { @session.fills_in "foo", :with => "blah" }.should raise_error
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user