From de3e0bd91ad8c7208ae9cbf1493db0fec58b7236 Mon Sep 17 00:00:00 2001 From: khall Date: Mon, 25 Aug 2014 15:26:03 -0700 Subject: [PATCH] Updating cucumber features --- features/step_definitions/custom_web_steps.rb | 12 ++++++------ features/step_definitions/posts_steps.rb | 2 +- features/step_definitions/web_steps.rb | 4 ++-- features/support/application_cuke_helpers.rb | 2 +- features/support/publishing_cuke_helpers.rb | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index ac06e50cb..0660b918e 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -150,12 +150,12 @@ end Then /^(?:|I )should not see a "([^\"]*)"(?: within "([^\"]*)")?$/ do |selector, scope_selector| with_scope(scope_selector) do - current_scope.has_css?(selector, :visible => true).should be_false + current_scope.has_css?(selector, :visible => true).should be false end end Then /^page should (not )?have "([^\"]*)"$/ do |negate, selector| - page.has_css?(selector).should ( negate ? be_false : be_true ) + page.has_css?(selector).should ( negate ? (be false) : (be true) ) end When /^I have turned off jQuery effects$/ do @@ -178,7 +178,7 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)" end Then /^I should see (\d+) contacts$/ do |n_posts| - has_css?("#people_stream .stream_element", :count => n_posts.to_i).should be_true + has_css?("#people_stream .stream_element", :count => n_posts.to_i).should be true end And /^I scroll down$/ do @@ -217,15 +217,15 @@ And /^I click close on all the popovers$/ do end Then /^I should see a flash message indicating success$/ do - flash_message_success?.should be_true + flash_message_success?.should be true end Then /^I should see a flash message indicating failure$/ do - flash_message_failure?.should be_true + flash_message_failure?.should be true end Then /^I should see a flash message with a warning$/ do - flash_message_alert?.should be_true + flash_message_alert?.should be true end Then /^I should see a flash message containing "(.+)"$/ do |text| diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb index 5388619cc..5537c4b92 100644 --- a/features/step_definitions/posts_steps.rb +++ b/features/step_definitions/posts_steps.rb @@ -19,7 +19,7 @@ Then /^I should not see any posts in my stream$/ do end Then /^I should not be able to submit the publisher$/ do - expect(publisher_submittable?).to be_false + expect(publisher_submittable?).to be false end Given /^"([^"]*)" has a public post with text "([^"]*)"$/ do |email, text| diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 49f20ddc2..4f414a41c 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -157,14 +157,14 @@ end Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should be checked$/ do |label, selector| with_scope(selector) do field_checked = find_field(label)['checked'] - field_checked.should be_true + field_checked.should eq('true') end end Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |label, selector| with_scope(selector) do field_checked = find_field(label)['checked'] - field_checked.should be_false + field_checked.should be false end end diff --git a/features/support/application_cuke_helpers.rb b/features/support/application_cuke_helpers.rb index 9cc3736d6..c99ee66bc 100644 --- a/features/support/application_cuke_helpers.rb +++ b/features/support/application_cuke_helpers.rb @@ -23,7 +23,7 @@ module ApplicationCukeHelpers def confirm_form_validation_error(element) is_invalid = page.evaluate_script("$('#{element}').is(':invalid')") - is_invalid.should be_true + is_invalid.should be true end def check_fields_validation_error(field_list) diff --git a/features/support/publishing_cuke_helpers.rb b/features/support/publishing_cuke_helpers.rb index 4765603a6..316941f14 100644 --- a/features/support/publishing_cuke_helpers.rb +++ b/features/support/publishing_cuke_helpers.rb @@ -42,7 +42,7 @@ module PublishingCukeHelpers def expand_first_post within(".stream_element", match: :first) do find(".expander").click - has_css?(".expander").should be_false + has_css?(".expander").should be false end end