spec/unit/namespace_spec.rb in activeadmin-0.4.4 vs spec/unit/namespace_spec.rb in activeadmin-0.5.0.pre

- old
+ new

@@ -17,11 +17,17 @@ it "should have no resources" do namespace.resources.resources.should be_empty end - it "should have an empty menu" do - namespace.menu.items.should be_empty + 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.menu.should have(1).item + else + namespace.menu.items.should be_empty + end end end # context "when new" describe "settings" do let(:namespace){ ActiveAdmin::Namespace.new(application, :admin) }