Sha256: f060681666b1221fb519e44f6415dfe761ec18bfe32de936a9c3a4929530d66e

Contents?: true

Size: 770 Bytes

Versions: 2

Compression:

Stored size: 770 Bytes

Contents

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

module Rswag3
  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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rswag3-specs-0.0.2 lib/rswag3/specs.rb
rswag3-specs-0.0.1 lib/rswag3/specs.rb