mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-23 06:16:42 +00:00
Use RSpec.describe to fix IRB context warning in Rails console
This commit is contained in:
parent
28245d4dd0
commit
e5eb44191c
@ -4,7 +4,7 @@ require 'generators/rswag/specs/install/install_generator'
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
describe InstallGenerator do
|
||||
RSpec.describe InstallGenerator do
|
||||
include GeneratorSpec::TestCase
|
||||
destination File.expand_path('../tmp', __FILE__)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ require 'rswag/specs/configuration'
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
describe Configuration do
|
||||
RSpec.describe Configuration do
|
||||
subject { described_class.new(rspec_config) }
|
||||
|
||||
let(:rspec_config) { OpenStruct.new(swagger_root: swagger_root, swagger_docs: swagger_docs) }
|
||||
|
||||
@ -3,7 +3,7 @@ require 'rswag/specs/example_group_helpers'
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
describe ExampleGroupHelpers do
|
||||
RSpec.describe ExampleGroupHelpers do
|
||||
subject { double('example_group') }
|
||||
|
||||
before do
|
||||
|
||||
@ -3,7 +3,7 @@ require 'rswag/specs/example_helpers'
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
describe ExampleHelpers do
|
||||
RSpec.describe ExampleHelpers do
|
||||
subject { double('example') }
|
||||
|
||||
before do
|
||||
|
||||
@ -3,7 +3,7 @@ require 'rswag/specs/request_factory'
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
describe RequestFactory do
|
||||
RSpec.describe RequestFactory do
|
||||
subject { RequestFactory.new(config) }
|
||||
|
||||
before do
|
||||
|
||||
@ -3,7 +3,7 @@ require 'rswag/specs/response_validator'
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
describe ResponseValidator do
|
||||
RSpec.describe ResponseValidator do
|
||||
subject { ResponseValidator.new(config) }
|
||||
|
||||
before do
|
||||
|
||||
@ -4,7 +4,7 @@ require 'ostruct'
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
describe SwaggerFormatter do
|
||||
RSpec.describe SwaggerFormatter do
|
||||
subject { described_class.new(output, config) }
|
||||
|
||||
# Mock out some infrastructure
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
feature 'swagger-ui', js: true do
|
||||
RSpec.feature 'swagger-ui', js: true do
|
||||
|
||||
scenario 'browsing api-docs' do
|
||||
visit '/api-docs'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
require 'swagger_helper'
|
||||
|
||||
describe 'Auth Tests API', type: :request, swagger_doc: 'v1/swagger.json' do
|
||||
RSpec.describe 'Auth Tests API', type: :request, swagger_doc: 'v1/swagger.json' do
|
||||
|
||||
path '/auth-tests/basic' do
|
||||
post 'Authenticates with basic auth' do
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
require 'swagger_helper'
|
||||
|
||||
describe 'Blogs API', type: :request, swagger_doc: 'v1/swagger.json' do
|
||||
RSpec.describe 'Blogs API', type: :request, swagger_doc: 'v1/swagger.json' do
|
||||
let(:api_key) { 'fake_key' }
|
||||
|
||||
path '/blogs' do
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
require 'rake'
|
||||
|
||||
describe 'rswag:specs:swaggerize' do
|
||||
RSpec.describe 'rswag:specs:swaggerize' do
|
||||
let(:swagger_root) { Rails.root.to_s + '/swagger' }
|
||||
before do
|
||||
TestApp::Application.load_tasks
|
||||
|
||||
Loading…
Reference in New Issue
Block a user