Skip to content

Commit

Permalink
Scope setting publish host to namespace: :publish specs
Browse files Browse the repository at this point in the history
  • Loading branch information
inulty-dfe committed Oct 31, 2024
1 parent a0d04ae commit 85979a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# PublishConstraint requires the server domain matches the request host to match routes
# Settings.base_url&.include?(request.host)
RSpec.configure do |config|
config.before type: :request do
config.before namespace: :publish, type: :request do
host! URI(Settings.base_url).host
end
end
8 changes: 8 additions & 0 deletions spec/support/derived_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,12 @@

metadata[:with_publish_constraint] = true
end

config.define_derived_metadata(file_path: Regexp.new('/spec/requests/find')) do |metadata|
metadata[:namespace] = :find
end

config.define_derived_metadata(file_path: Regexp.new('/spec/requests/publish')) do |metadata|
metadata[:namespace] = :publish
end
end

0 comments on commit 85979a9

Please sign in to comment.