mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
rename to rswag plus major refactor - almost a rewrite
This commit is contained in:
22
rswag-specs/lib/rswag/specs.rb
Normal file
22
rswag-specs/lib/rswag/specs.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
require 'rspec/core'
|
||||
require 'rswag/specs/version'
|
||||
require 'rswag/specs/example_group_helpers'
|
||||
require 'rswag/specs/example_helpers'
|
||||
require 'rswag/specs/railtie' if defined?(Rails::Railtie)
|
||||
|
||||
module Rswag
|
||||
module Specs
|
||||
|
||||
# Extend RSpec with a swagger-based DSL
|
||||
::RSpec.configure do |c|
|
||||
c.add_setting :swagger_root
|
||||
c.add_setting :swagger_docs
|
||||
c.extend ExampleGroupHelpers, type: :request
|
||||
c.include ExampleHelpers, type: :request
|
||||
end
|
||||
|
||||
# Support Rails 3+ and RSpec 2+ (sigh!)
|
||||
RAILS_VERSION = Rails::VERSION::MAJOR
|
||||
RSPEC_VERSION = RSpec::Core::Version::STRING.split('.').first.to_i
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user