Sha256: ee646d69cf2c913720c1ba969c7b727d99ef1d2448edba655f36e665a959374e

Contents?: true

Size: 544 Bytes

Versions: 27

Compression:

Stored size: 544 Bytes

Contents

require "spec_helper"

describe "Swagger", feature: true do

  describe "GET #{MOUNT_SWAGGER_JSON}" do
    let!(:response) { get MOUNT_SWAGGER_JSON }

    it "responds successfully" do
      expect(response.status).to eq 200
    end

    it "exposes a JSON hash" do
      expect(JSON.parse(response.body)).to be_an_instance_of(Hash)
    end

    it "writes the API doc" do
      json_file = File.expand_path "../../swagger.json"
      puts "YEAH: #{json_file}"
      File.write(json_file, response.body)
    end

  end # GET /swagger.json

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.502.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.501.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.435.2 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.435.1 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.435.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.434.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.433.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.432.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.430.1 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.430.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.424.3 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.424.2 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.424.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.423.3 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.423.2 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.423.1 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.423.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.422.0 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.421.1 spec/rest-ftp-daemon/features/swagger_spec.rb
rest-ftp-daemon-0.421.0 spec/rest-ftp-daemon/features/swagger_spec.rb