Sha256: b35f12fad238a88f81fbbdd0ef37426df4190caf9dafb404f45cc0fc3589ba04

Contents?: true

Size: 856 Bytes

Versions: 4

Compression:

Stored size: 856 Bytes

Contents

require 'rspec/core'
require 'open_api/rswag/specs/example_group_helpers'
require 'open_api/rswag/specs/example_helpers'
require 'open_api/rswag/specs/configuration'
require 'open_api/rswag/specs/railtie' if defined?(Rails::Railtie)

module OpenApi
  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.add_setting :swagger_dry_run
        c.extend ExampleGroupHelpers, type: :request
        c.include ExampleHelpers, type: :request
      end

      def self.config
        @config ||= Configuration.new(RSpec.configuration)
      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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
open_api-rswag-specs-0.1.0 lib/open_api/rswag/specs.rb
open_api-rswag-specs-0.0.6 lib/open_api/rswag/specs.rb
open_api-rswag-specs-0.0.5 lib/open_api/rswag/specs.rb
open_api-rswag-specs-0.0.4 lib/open_api/rswag/specs.rb