Sha256: 77df8d7ffdbe4155f15262f6003f8fe8ebec9df26aeee98489131c71ee57bf30

Contents?: true

Size: 939 Bytes

Versions: 45

Compression:

Stored size: 939 Bytes

Contents

require 'spec_helper'

describe Api::V1::ArchitecturesController do
  describe "resource description" do
    subject { Apipie.get_resource_description(Api::V1::ArchitecturesController, "1.0") }

    it "should be version 1.0" do
      expect(subject._version).to eq('1.0')

      expect(Apipie.resource_descriptions['1.0'].size).to eq(2)
      expect(Apipie.resource_descriptions['1.0'].keys).to include('architectures', 'base')
    end

    context "there is another version" do
      let(:v2) { archv2 = Apipie.get_resource_description(Api::V2::ArchitecturesController, "2.0") }

      it "should have unique doc url" do
        expect(subject.doc_url).not_to eq(v2.doc_url)
      end

      it "should have unique methods" do
        expect(subject._methods.keys).to include(:index)
        expect(v2._methods.keys).to include(:index)
        expect(subject._methods[:index]).not_to eq(v2._methods[:index])
      end

    end
  end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
apipie-rails-1.4.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-1.3.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-1.2.3 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-1.2.2 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-1.2.1 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-1.2.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-1.1.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-1.0.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.9.4 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.9.3 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.9.2 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.9.1 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.9.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.8.2 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.8.1 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.8.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.7.2 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.7.1 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.7.0 spec/controllers/api/v1/architectures_controller_spec.rb
apipie-rails-0.6.0 spec/controllers/api/v1/architectures_controller_spec.rb