Skip to content

Commit

Permalink
Merge pull request #6258 from samvera/more-wings-skips
Browse files Browse the repository at this point in the history
skip more Wings specs
  • Loading branch information
hackartisan authored Aug 30, 2023
2 parents 8cf4801 + 5ee771b commit 2c5dfb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 2c5dfb6

Please sign in to comment.