diff --git a/spec/initializers/application_config_spec.rb b/spec/initializers/application_config_spec.rb index 495559697..7ecb5562a 100644 --- a/spec/initializers/application_config_spec.rb +++ b/spec/initializers/application_config_spec.rb @@ -35,11 +35,7 @@ describe ApplicationConfig do private def setup_app_domain(app_domain) - # No #and_return for #have_received. - # rubocop:disable RSpec/MessageSpies - expect(ApplicationConfig).to receive(:[]).with("APP_DOMAIN") - .and_return(app_domain) - # rubocop:enable RSpec/MessageSpies + allow(ApplicationConfig).to receive(:[]).with("APP_DOMAIN").and_return(app_domain) end end end diff --git a/spec/requests/invitations_spec.rb b/spec/requests/invitations_spec.rb index e3e8b4fe1..2a5b88ca1 100644 --- a/spec/requests/invitations_spec.rb +++ b/spec/requests/invitations_spec.rb @@ -9,7 +9,7 @@ RSpec.describe "Invitations", type: :request do get "/users/invitation/accept?invitation_token=blahblahblahblah" # This is a fake token, so the only thing we're testing for here is # that we *do not* land on the "registrations" page which shouldn't - # interrupt the request, even for private forems. + # interrupt the request, even for private forems. expect(response.body).not_to include("registration__actions") end end diff --git a/spec/system/admin/admin_creates_new_page.rb b/spec/system/admin/admin_creates_new_page.rb index 676ad7686..7a2031f39 100644 --- a/spec/system/admin/admin_creates_new_page.rb +++ b/spec/system/admin/admin_creates_new_page.rb @@ -1,7 +1,6 @@ require "rails_helper" RSpec.describe "Admin creates new page", type: :system do - let(:admin) { create(:user, :super_admin) } context "when we pass through a slug param" do @@ -11,10 +10,12 @@ RSpec.describe "Admin creates new page", type: :system do end it "will pre-populate the fields correctly" do - expect(find_field("page[title]").value).to eq "Code of Conduct" - expect(find_field("page[slug]").value).to eq "code-of-conduct" - expect(find_field("page[is_top_level_path]").value).to eq "1" - expect(find_field("page[body_html]").value).to include "All participants of the #{community_qualified_name} are expected to abide by our Code of Conduct," + expect(find_field("page[title]").value).to eq("Code of Conduct") + expect(find_field("page[slug]").value).to eq("code-of-conduct") + expect(find_field("page[is_top_level_path]").value).to eq("1") + + text = "All participants of the #{community_qualified_name} are expected to abide by our Code of Conduct" + expect(find_field("page[body_html]").value).to include(text) end end end