We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. When I type RAILS_ENV=test OPENAPI=1 bundle exec rspec [spec file path] the following error happens.
RAILS_ENV=test OPENAPI=1 bundle exec rspec [spec file path]
NoMethodError: undefined method `script_name' for nil:NilClass # /usr/local/bundle/gems/rspec-openapi-0.3.12/lib/rspec/openapi/record_builder.rb:64:in `find_rails_route' # /usr/local/bundle/gems/rspec-openapi-0.3.12/lib/rspec/openapi/record_builder.rb:19:in `build' # /usr/local/bundle/gems/rspec-openapi-0.3.12/lib/rspec/openapi/hooks.rb:12:in `block in <top (required)>'
The following is the content of the target test file.
require 'rails_helper' RSpec.describe V2::Admin::NotificationsController, type: :request do describe 'GET /v2/admin/notifications' do subject { get v2_admin_notifications_url, params: params } let!(:users) { create_list(:user) } let(:params) { nil } it { is_expected.to be 200 } end end
I found that if I do not use create_list, no error occurs.
create_list
gem version: 0.3.12
The text was updated successfully, but these errors were encountered:
What is create_list? I don't think it's a part of rspec-openapi. Could you prepare a repository that reproduces your issue?
Sorry, something went wrong.
30e2fc1
Although I couldn't test your create_list case, I could figure out a case where the same backtrace happens. I'll release the fix as v0.3.13.
No branches or pull requests
Hi. When I type
RAILS_ENV=test OPENAPI=1 bundle exec rspec [spec file path]
the following error happens.The following is the content of the target test file.
I found that if I do not use
create_list
, no error occurs.gem version: 0.3.12
The text was updated successfully, but these errors were encountered: