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

- old
+ new

@@ -1,6 +1,6 @@ -require 'spec_helper' +require 'spec_helper' describe ActiveAdmin::Namespace do let(:application){ ActiveAdmin::Application.new } @@ -14,21 +14,15 @@ it "should have a name" do namespace.name.should == :admin end it "should have no resources" do - namespace.resources.resources.should be_empty + namespace.resources.should be_empty end it "should not have any menu item" do - if ActiveAdmin::Dashboards.built? - # DEPRECATED behavior. If a dashboard was built while running this - # spec, then an item gets added to the menu - namespace.fetch_menu(:default).children.should_not be_empty - else - namespace.fetch_menu(:default).children.should be_empty - end + namespace.fetch_menu(:default).children.should be_empty end end # context "when new" describe "settings" do let(:namespace){ ActiveAdmin::Namespace.new(application, :admin) } @@ -84,10 +78,10 @@ end end describe "utility navigation" do let(:namespace){ ActiveAdmin::Namespace.new(application, :admin) } - let(:menu) do + let(:menu) do namespace.build_menu :utility_navigation do |menu| menu.add :label => "ActiveAdmin.info", :url => "http://www.activeadmin.info", :html_options => { :target => :blank } namespace.add_logout_button_to_menu menu, 1, :class => "matt" end namespace.fetch_menu(:utility_navigation)