Sha256: aa3cbf7c3d01b26a77764e483d6ad4fccecd21ff85e2485e96476614dd652000
Contents?: true
Size: 628 Bytes
Versions: 2
Compression:
Stored size: 628 Bytes
Contents
require 'rails_helper' describe GrapeSwagger, type: :request do context :swagger_doc do it "should render swagger docs for the api" do get '/api/v1/swagger_doc' response.should be_success json = JSON.parse( response.body ) if Gem::Version.new( GrapeSwagger::VERSION ) <= Gem::Version.new('0.11.0') json['apiVersion'].should == '0.1' else json['paths'].map {|p| p[1].values }.flatten.map{|p| p['parameters']}.flatten.compact.map{|p| p['name']}.each do |name| name.should eq name.camelize(:lower).gsub(/Destroy/,'_destroy') end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
introspective_grape-0.3.5 | spec/requests/swagger_spec.rb |
introspective_grape-0.3.3 | spec/requests/swagger_spec.rb |