diff --git a/spec/features/admin/configuration/tax_categories_spec.rb b/spec/features/admin/configuration/tax_categories_spec.rb index f3e3ec4f67..916811df0c 100644 --- a/spec/features/admin/configuration/tax_categories_spec.rb +++ b/spec/features/admin/configuration/tax_categories_spec.rb @@ -13,11 +13,11 @@ describe "Tax Categories" do it "should display the existing tax categories" do create(:tax_category, :name => "Clothing", :description => "For Clothing") click_link "Tax Categories" - page.should have_content("Listing Tax Categories") + expect(page).to have_content("Listing Tax Categories") within_row(1) do - column_text(1).should == "Clothing" - column_text(2).should == "For Clothing" - column_text(3).should == "False" + expect(column_text(1)).to eq("Clothing") + expect(column_text(2)).to eq("For Clothing") + expect(column_text(3)).to eq("False") end end end @@ -29,16 +29,16 @@ describe "Tax Categories" do end it "should be able to create new tax category" do - page.should have_content("New Tax Category") + expect(page).to have_content("New Tax Category") fill_in "tax_category_name", :with => "sports goods" fill_in "tax_category_description", :with => "sports goods desc" click_button "Create" - page.should have_content("successfully created!") + expect(page).to have_content("successfully created!") end it "should show validation errors if there are any" do click_button "Create" - page.should have_content("Name can't be blank") + expect(page).to have_content("Name can't be blank") end end @@ -49,8 +49,8 @@ describe "Tax Categories" do within_row(1) { click_icon :edit } fill_in "tax_category_description", :with => "desc 99" click_button "Update" - page.should have_content("successfully updated!") - page.should have_content("desc 99") + expect(page).to have_content("successfully updated!") + expect(page).to have_content("desc 99") end end end diff --git a/spec/features/admin/configuration/tax_rates_spec.rb b/spec/features/admin/configuration/tax_rates_spec.rb index 9e64d2cb7a..1ed41381da 100644 --- a/spec/features/admin/configuration/tax_rates_spec.rb +++ b/spec/features/admin/configuration/tax_rates_spec.rb @@ -15,9 +15,9 @@ describe "Tax Rates" do # Regression test for #535 it "can see a tax rate in the list if the tax category has been deleted" do tax_rate.tax_category.update_column(:deleted_at, Time.zone.now) - lambda { click_link "Tax Rates" }.should_not raise_error + expect { click_link "Tax Rates" }.not_to raise_error within("table tbody td:nth-child(3)") do - page.should have_content("N/A") + expect(page).to have_content("N/A") end end @@ -27,6 +27,6 @@ describe "Tax Rates" do click_link "New Tax Rate" fill_in "Rate", with: "0.05" click_button "Create" - page.should have_content("Tax Rate has been successfully created!") + expect(page).to have_content("Tax Rate has been successfully created!") end end