diff --git a/features/step_definitions/activate_enterprise_steps.rb b/features/step_definitions/activate_enterprise_steps.rb index 3578108..83b7e3b 100644 --- a/features/step_definitions/activate_enterprise_steps.rb +++ b/features/step_definitions/activate_enterprise_steps.rb @@ -5,7 +5,7 @@ Given /^I fill in "([^\"]*)" with code of "([^\"]*)"$/ do |field, enterprise| end Given /^enterprise "([^\"]*)" should be enabled$/ do |enterprise| - Enterprise.find_by_name(enterprise).enabled?.should be_true + Enterprise.find_by_name(enterprise).enabled?.should be_truthy end Given /^"([^\"]*)" is the active enterprise template$/ do |enterprise| @@ -26,34 +26,34 @@ end Given /^"([^\"]*)" has "([^\"]*)" as template$/ do |ent, templ| template = Enterprise.find_by_name(templ) enterprise = Enterprise.find_by_name(ent) - (template.boxes.size == enterprise.boxes.size).should be_true - (template.layout_template == enterprise.layout_template).should be_true - (template.theme == enterprise.theme).should be_true - (template.custom_header == enterprise.custom_header).should be_true - (template.custom_footer == enterprise.custom_footer).should be_true + (template.boxes.size == enterprise.boxes.size).should be_truthy + (template.layout_template == enterprise.layout_template).should be_truthy + (template.theme == enterprise.theme).should be_truthy + (template.custom_header == enterprise.custom_header).should be_truthy + (template.custom_footer == enterprise.custom_footer).should be_truthy end Given /^"([^\"]*)" doesnt have "([^\"]*)" as template$/ do |ent, templ| template = Enterprise.find_by_name(templ) enterprise = Enterprise.find_by_name(ent) - (template.boxes.size == enterprise.boxes.size).should be_false - (template.layout_template == enterprise.layout_template).should be_false - (template.theme == enterprise.theme).should be_false - (template.custom_header == enterprise.custom_header).should be_false - (template.custom_footer == enterprise.custom_footer).should be_false + (template.boxes.size == enterprise.boxes.size).should be_falsey + (template.layout_template == enterprise.layout_template).should be_falsey + (template.theme == enterprise.theme).should be_falsey + (template.custom_header == enterprise.custom_header).should be_falsey + (template.custom_footer == enterprise.custom_footer).should be_falsey end Given /^enterprise "([^\"]*)" is enabled$/ do |enterprise| Enterprise.find_by_name(enterprise).update_attribute(:enabled,true) - Enterprise.find_by_name(enterprise).enabled?.should be_true + Enterprise.find_by_name(enterprise).enabled?.should be_truthy end Given /^enterprise "([^\"]*)" should be blocked$/ do |enterprise| - Enterprise.find_by_name(enterprise).blocked?.should be_true + Enterprise.find_by_name(enterprise).blocked?.should be_truthy end Given /^enterprise "([^\"]*)" should not be blocked$/ do |enterprise| - Enterprise.find_by_name(enterprise).blocked?.should_not be_true + Enterprise.find_by_name(enterprise).blocked?.should_not be_truthy end Given /^enterprise template must be replaced after enable$/ do diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index dd5d6cd..69ab532 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -24,12 +24,12 @@ end Then /^the "([^"]*)" button should be disabled$/ do |selector| field = find(selector) - field['disabled'].should be_true + field['disabled'].should be_truthy end Then /^the "([^"]*)" button should be enabled$/ do |selector| field = find(selector) - field['disabled'].should_not be_true + field['disabled'].should_not be_truthy end When /^I reload and wait for the page$/ do diff --git a/features/step_definitions/noosfero_steps.rb b/features/step_definitions/noosfero_steps.rb index f84e19b..372a8e5 100644 --- a/features/step_definitions/noosfero_steps.rb +++ b/features/step_definitions/noosfero_steps.rb @@ -534,7 +534,7 @@ end Then /^I should receive an e-mail on (.*)$/ do |address| last_mail = ActionMailer::Base.deliveries.last - last_mail.nil?.should be_false + last_mail.nil?.should be_falsey last_mail['to'].to_s.should == address end @@ -545,16 +545,16 @@ end Then /^there should be an? (.+) named "([^\"]*)"$/ do |klass_name, profile_name| klass = klass_name.camelize.constantize - klass.find_by_name(profile_name).nil?.should be_false + klass.find_by_name(profile_name).nil?.should be_falsey end Then /^"([^\"]*)" profile should exist$/ do |profile_selector| profile = nil begin profile = Profile.find_by_name(profile_selector) - profile.nil?.should be_false + profile.nil?.should be_falsey rescue - profile.nil?.should be_false + profile.nil?.should be_falsey end end @@ -562,9 +562,9 @@ Then /^"([^\"]*)" profile should not exist$/ do |profile_selector| profile = nil begin profile = Profile.find_by_name(profile_selector) - profile.nil?.should be_true + profile.nil?.should be_truthy rescue - profile.nil?.should be_true + profile.nil?.should be_truthy end end diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index 3f96dcf..640c13a 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -203,7 +203,7 @@ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should be checked$/ do |labe with_scope(selector) do field_checked = find_field(label)['checked'] if field_checked.respond_to? :should - field_checked.should be_true + field_checked.should be_truthy else assert field_checked end @@ -214,7 +214,7 @@ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do | with_scope(selector) do field_checked = find_field(label)['checked'] if field_checked.respond_to? :should - field_checked.should be_false + field_checked.should be_falsey else assert !field_checked end -- libgit2 0.21.2