Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip more Wings specs #6258

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -333,16 +333,16 @@ def clean_active_fedora_repository
config.prepend_before(:example, :valkyrie_adapter) do |example|
adapter_name = example.metadata[:valkyrie_adapter]

allow(Hyrax)
.to receive(:metadata_adapter)
.and_return(Valkyrie::MetadataAdapter.find(adapter_name))

if adapter_name == :wings_adapter
skip("Don't test Wings when it is dasabled") if Hyrax.config.disable_wings
else
allow(Hyrax.config).to receive(:disable_wings).and_return(true)
hide_const("Wings") # disable_wings=true removes the Wings constant
end

allow(Hyrax)
.to receive(:metadata_adapter)
.and_return(Valkyrie::MetadataAdapter.find(adapter_name))
end

# Prepend this before block to ensure that it runs before other before blocks like clean_repo
Expand Down
2 changes: 1 addition & 1 deletion spec/wings/valkyrie/metadata_adapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'valkyrie/specs/shared_specs'
require 'wings'

RSpec.describe Wings::Valkyrie::MetadataAdapter do
RSpec.describe Wings::Valkyrie::MetadataAdapter, :active_fedora do
let(:adapter) { described_class.new }

it_behaves_like "a Valkyrie::MetadataAdapter"
Expand Down