Sha256: a1cd436f69f9ddb703fb161814a11cc30aa0c9a66c2f54735f3df12c71b747c5

Contents?: true

Size: 732 Bytes

Versions: 2

Compression:

Stored size: 732 Bytes

Contents

require "spec_helper"

describe Apipie::Application do

  describe "get_resource_name" do
    subject {Apipie.get_resource_name(Api::V2::Nested::ArchitecturesController)}
    context "with namespaced_resources enabled" do
      before { Apipie.configuration.namespaced_resources = true }

      it "should not overwrite the parent resource" do
        subject.should_not eq(Apipie.get_resource_name(Api::V2::ArchitecturesController))
      end
    end

    context "with namespaced_resources enabled" do
      before { Apipie.configuration.namespaced_resources = false }

      it "should overwrite the the parent" do
        subject.should eq(Apipie.get_resource_name(Api::V2::ArchitecturesController))
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
apipie-rails-0.0.21 spec/lib/application_spec.rb
apipie-rails-0.0.20 spec/lib/application_spec.rb