Sha256: 519bb32969fcb9dd83ec7eddf87dbddad0af33b1b46c57b34a59e5fda6b8da4d

Contents?: true

Size: 1.09 KB

Versions: 10

Compression:

Stored size: 1.09 KB

Contents

require "rspec/core"

require_relative "./swagalicious/version"

begin
  require "rspec/rails"
rescue LoadError
  nil
end

class Swagalicious
  class Error < StandardError; end

  def self.config
    @config ||= Swagalicious::Configuration.new(RSpec.configuration)
  end

  require_relative "./swagalicious/configuration"
  require_relative "./swagalicious/example_group_helpers"
  require_relative "./swagalicious/example_helpers"
  require_relative "./swagalicious/extended_schema"
  require_relative "./swagalicious/request_factory"
  require_relative "./swagalicious/response_validator"
  require_relative "./swagalicious/swagger_formatter"

  ::RSpec::Core::ExampleGroup.define_example_group_method :path

  ::RSpec.configure do |c|
    c.add_setting :swagger_format
    c.add_setting :swagger_root
    c.add_setting :swagger_docs
    c.add_setting :swagger_dry_run

    if defined?(Rails) && defined?(RSpec::Rails)
      c.include RSpec::Rails::RequestExampleGroup, type: :doc
    end

    c.extend Swagalicious::ExampleGroupHelpers, type: :doc
    c.include Swagalicious::ExampleHelpers, type: :doc
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
swagalicious-1.1.2 lib/swagalicious.rb
swagalicious-1.1.1 lib/swagalicious.rb
swagalicious-1.1.0 lib/swagalicious.rb
swagalicious-1.0.0 lib/swagalicious.rb
swagalicious-0.5.3 lib/swagalicious.rb
swagalicious-0.5.2 lib/swagalicious.rb
swagalicious-0.5.1 lib/swagalicious.rb
swagalicious-0.5.0 lib/swagalicious.rb
swagalicious-0.4.9 lib/swagalicious.rb
swagalicious-0.4.8 lib/swagalicious.rb