Added RSpec shared endpoint examples

Necessary to a define shared example for all endpoints to reduce duplication. This'll soon be used in all endpoint specs.

Milestone: minor
This commit is contained in:
Brooke Kuhlmann
2025-05-19 08:21:40 -06:00
parent 6b95d89a3f
commit 5b23be83ce
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -23,6 +23,7 @@ SPEC_ROOT = Pathname(__dir__).realpath.freeze
using Refinements::Pathname
Pathname.require_tree SPEC_ROOT.join("support/shared_contexts")
Pathname.require_tree SPEC_ROOT.join("support/shared_examples")
RSpec.configure do |config|
config.color = true
@@ -0,0 +1,7 @@
# frozen_string_literal: true
RSpec.shared_examples "an inspectable endpoint" do |target|
it "answers contract class" do
expect(target.inspect).to include("@contract=Dry::Schema::JSON, ")
end
end