Load spec helper not knowing Rails

When the application is not preloaded then running Rspec doesn't know
Rails until the spec helper is loaded. So we can't use Rails to find the
path of the spec helper. This has been fixed before but the DFC Address
code was developed at the same time and missed.
This commit is contained in:
Maikel Linke
2023-09-14 13:28:33 +10:00
parent 458767fe13
commit 2175c59a6b
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require DfcProvider::Engine.root.join("spec/swagger_helper")
require_relative "../swagger_helper"
describe "Addresses", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc: true do
let(:user) { create(:oidc_user) }

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require DfcProvider::Engine.root.join("spec/spec_helper")
require_relative "../spec_helper"
describe AddressBuilder do
subject(:result) { described_class.address(address) }