Skip to content

Commit

Permalink
test: ensure RspecApiDocumentation.configuration.app is set
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed Apr 25, 2024
1 parent 673d267 commit e1ba3e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/dsl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
resource "Order" do
explanation "Order resource explanation"

let(:context) { |example| double(:app => StubApp, :example => example) }

before do
RspecApiDocumentation.configuration.app ||= context.app
end

describe "example metadata" do
subject { |example| example.metadata }

Expand Down
4 changes: 4 additions & 0 deletions spec/rack_test_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

subject { test_client }

before do
RspecApiDocumentation.configuration.app ||= context.app
end

it { expect(subject).to be_a(RspecApiDocumentation::RackTestClient) }

its(:context) { should equal(context) }
Expand Down

0 comments on commit e1ba3e4

Please sign in to comment.