spec/unit/resource_registration_spec.rb in activeadmin-0.6.0 vs spec/unit/resource_registration_spec.rb in activeadmin-0.6.1

- old
+ new

@@ -1,12 +1,12 @@ -require 'spec_helper' +require 'spec_helper' describe "Registering an object to administer" do - let(:application){ ActiveAdmin::Application.new } + application = ActiveAdmin::Application.new context "with no configuration" do - let(:namespace) { ActiveAdmin::Namespace.new(application, :admin) } + namespace = ActiveAdmin::Namespace.new(application, :admin) it "should call register on the namespace" do application.namespaces[namespace.name] = namespace namespace.should_receive(:register) application.register Category @@ -48,18 +48,9 @@ it "should run the dsl in the same config object" do config_1 = ActiveAdmin.register(Category) { filter :name } config_2 = ActiveAdmin.register(Category) { filter :id } config_1.should == config_2 config_1.filters.size.should == 2 - end - - context "with different resource classes" do - it "should raise an ActiveAdmin::ResourceMismatch" do - lambda { - ActiveAdmin.register Category - ActiveAdmin.register Post, :as => "Category" - }.should raise_error(ActiveAdmin::ResourceMismatchError) - end end end end