gregbell/active_admin — Issue #1105: Can't run unit tests: ActiveAdmin::MenuItem with no children should be empty
Author: dickeyxxx
Created: 2012-03-03 23:49:25+00:00
State: open

I'm getting the following output when I run `rake test` on Ruby 1.9.3

````
/Users/dickeytk/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -S rspec spec/unit/abstract_view_factory_spec.rb spec/unit/action_builder_spec.rb spec/unit/active_admin_spec.rb spec/unit/application_spec.rb spec/unit/arbre/context_spec.rb spec/unit/arbre/html/element_finder_methods_spec.rb spec/unit/arbre/html/element_spec.rb spec/unit/arbre/html/tag_attributes_spec.rb spec/unit/arbre/html/tag_spec.rb spec/unit/arbre/html_spec.rb spec/unit/asset_registration_spec.rb spec/unit/auto_link_spec.rb spec/unit/base_controller_spec.rb spec/unit/belongs_to_spec.rb spec/unit/breadcrumbs_spec.rb spec/unit/comments_spec.rb spec/unit/component_spec.rb spec/unit/controller_filters_spec.rb spec/unit/csv_builder_spec.rb spec/unit/dashboard_controller_spec.rb spec/unit/dashboard_section_spec.rb spec/unit/dashboards_spec.rb spec/unit/devise_spec.rb spec/unit/display_name_spec.rb spec/unit/event_spec.rb spec/unit/filter_form_builder_spec.rb spec/unit/form_builder_spec.rb spec/unit/generators/install_rails_3_1_spec.rb spec/unit/helpers/scope_chain_spec.rb spec/unit/helpers/settings_spec.rb spec/unit/menu_item_spec.rb spec/unit/menu_spec.rb spec/unit/namespace/register_page_spec.rb spec/unit/namespace/register_resource_spec.rb spec/unit/namespace_spec.rb spec/unit/page_controller_spec.rb spec/unit/page_spec.rb spec/unit/pretty_format_spec.rb spec/unit/rails_spec.rb spec/unit/reloader_spec.rb spec/unit/resource/action_items_spec.rb spec/unit/resource/menu_spec.rb spec/unit/resource/naming_spec.rb spec/unit/resource/page_presenters_spec.rb spec/unit/resource/pagination_spec.rb spec/unit/resource/scopes_spec.rb spec/unit/resource/sidebars_spec.rb spec/unit/resource_collection_spec.rb spec/unit/resource_controller/collection_spec.rb spec/unit/resource_controller_spec.rb spec/unit/resource_registration_spec.rb spec/unit/resource_spec.rb spec/unit/routing_spec.rb spec/unit/sass/helpers_spec.rb spec/unit/scope_spec.rb spec/unit/view_factory_spec.rb spec/unit/views/components/attributes_table_spec.rb spec/unit/views/components/blank_slate_spec.rb spec/unit/views/components/columns_spec.rb spec/unit/views/components/paginated_collection_spec.rb spec/unit/views/components/panel_spec.rb spec/unit/views/components/sidebar_section_spec.rb spec/unit/views/components/site_title_spec.rb spec/unit/views/components/status_tag_spec.rb spec/unit/views/components/table_for_spec.rb spec/unit/views/pages/layout_spec.rb spec/unit/views/tabbed_navigation_spec.rb
......................DEPRECATION WARNING: Active Admin: ActiveAdmin.default_namespace is deprecated. Please use ActiveAdmin.application.default_namespace. (called from block (3 levels) in at /Users/dickeytk/projects/os/active_admin/spec/unit/active_admin_spec.rb:8)
............................................................................................................................................................................................................................/Users/dickeytk/.rvm/gems/ruby-1.9.3-p125/gems/rails-i18n-0.5.1/lib/rails_i18n/../../rails/transliteration/ru.rb:7: warning: already initialized constant LOWER_SINGLE
/Users/dickeytk/.rvm/gems/ruby-1.9.3-p125/gems/rails-i18n-0.5.1/lib/rails_i18n/../../rails/transliteration/ru.rb:18: warning: already initialized constant LOWER_MULTI
/Users/dickeytk/.rvm/gems/ruby-1.9.3-p125/gems/rails-i18n-0.5.1/lib/rails_i18n/../../rails/transliteration/ru.rb:23: warning: already initialized constant UPPER_SINGLE
/Users/dickeytk/.rvm/gems/ruby-1.9.3-p125/gems/rails-i18n-0.5.1/lib/rails_i18n/../../rails/transliteration/ru.rb:34: warning: already initialized constant UPPER_MULTI
/Users/dickeytk/.rvm/gems/ruby-1.9.3-p125/gems/rails-i18n-0.5.1/lib/rails_i18n/../../rails/transliteration/ru.rb:39: warning: already initialized constant LOWER
/Users/dickeytk/.rvm/gems/ruby-1.9.3-p125/gems/rails-i18n-0.5.1/lib/rails_i18n/../../rails/transliteration/ru.rb:40: warning: already initialized constant UPPER
/Users/dickeytk/.rvm/gems/ruby-1.9.3-p125/gems/rails-i18n-0.5.1/lib/rails_i18n/../../rails/transliteration/ru.rb:41: warning: already initialized constant MULTI_KEYS
.........*..............DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
.DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
.DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
.DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
..DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
.DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
.DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
.DEPRECATION WARNING: f.buttons is deprecated in favour of f.actions and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in buttons at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:30)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
DEPRECATION WARNING: f.commit_button is deprecated in favour of f.action(:submit) and will be removed from Formtastic after 2.1. Please see ActionsHelper and InputAction or ButtonAction for more information. (called from block in commit_button at /Users/dickeytk/projects/os/active_admin/lib/active_admin/form_builder.rb:36)
.....................F.........F.......................................................................................................................................................................................................................................................................................................................................................................................................................

Pending:
ActiveAdmin::ViewHelpers::FilterFormHelper integer attribute should select the option which is currently being filtered
# Not yet implemented
# ./spec/unit/filter_form_builder_spec.rb:116

Failures:

1) ActiveAdmin::MenuItem with no children should be empty
Failure/Error: item.children.should be_an_instance_of(Menu::ItemCollection)
expected [] to be an instance of ActiveAdmin::Menu::ItemCollection
# ./spec/unit/menu_item_spec.rb:38:in `block (3 levels) in '

2) ActiveAdmin::Menu with no items should have an empty item collection
Failure/Error: menu.items.should be_an_instance_of(Menu::ItemCollection)
expected [] to be an instance of ActiveAdmin::Menu::ItemCollection
# ./spec/unit/menu_spec.rb:13:in `block (3 levels) in '

Finished in 36.08 seconds
713 examples, 2 failures, 1 pending

Failed examples:

rspec ./spec/unit/menu_item_spec.rb:36 # ActiveAdmin::MenuItem with no children should be empty
rspec ./spec/unit/menu_spec.rb:11 # ActiveAdmin::Menu with no items should have an empty item collection
rake aborted!
/Users/dickeytk/.rvm/rubies/ruby-1.9.3-p125/bin/ruby -S rspec spec/unit/abstract_view_factory_spec.rb spec/unit/action_builder_spec.rb spec/unit/active_admin_spec.rb spec/unit/application_spec.rb spec/unit/arbre/context_spec.rb spec/unit/arbre/html/element_finder_methods_spec.rb spec/unit/arbre/html/element_spec.rb spec/unit/arbre/html/tag_attributes_spec.rb spec/unit/arbre/html/tag_spec.rb spec/unit/arbre/html_spec.rb spec/unit/asset_registration_spec.rb spec/unit/auto_link_spec.rb spec/unit/base_controller_spec.rb spec/unit/belongs_to_spec.rb spec/unit/breadcrumbs_spec.rb spec/unit/comments_spec.rb spec/unit/component_spec.rb spec/unit/controller_filters_spec.rb spec/unit/csv_builder_spec.rb spec/unit/dashboard_controller_spec.rb spec/unit/dashboard_section_spec.rb spec/unit/dashboards_spec.rb spec/unit/devise_spec.rb spec/unit/display_name_spec.rb spec/unit/event_spec.rb spec/unit/filter_form_builder_spec.rb spec/unit/form_builder_spec.rb spec/unit/generators/install_rails_3_1_spec.rb spec/unit/helpers/scope_chain_spec.rb spec/unit/helpers/settings_spec.rb spec/unit/menu_item_spec.rb spec/unit/menu_spec.rb spec/unit/namespace/register_page_spec.rb spec/unit/namespace/register_resource_spec.rb spec/unit/namespace_spec.rb spec/unit/page_controller_spec.rb spec/unit/page_spec.rb spec/unit/pretty_format_spec.rb spec/unit/rails_spec.rb spec/unit/reloader_spec.rb spec/unit/resource/action_items_spec.rb spec/unit/resource/menu_spec.rb spec/unit/resource/naming_spec.rb spec/unit/resource/page_presenters_spec.rb spec/unit/resource/pagination_spec.rb spec/unit/resource/scopes_spec.rb spec/unit/resource/sidebars_spec.rb spec/unit/resource_collection_spec.rb spec/unit/resource_controller/collection_spec.rb spec/unit/resource_controller_spec.rb spec/unit/resource_registration_spec.rb spec/unit/resource_spec.rb spec/unit/routing_spec.rb spec/unit/sass/helpers_spec.rb spec/unit/scope_spec.rb spec/unit/view_factory_spec.rb spec/unit/views/components/attributes_table_spec.rb spec/unit/views/components/blank_slate_spec.rb spec/unit/views/components/columns_spec.rb spec/unit/views/components/paginated_collection_spec.rb spec/unit/views/components/panel_spec.rb spec/unit/views/components/sidebar_section_spec.rb spec/unit/views/components/site_title_spec.rb spec/unit/views/components/status_tag_spec.rb spec/unit/views/components/table_for_spec.rb spec/unit/views/pages/layout_spec.rb spec/unit/views/tabbed_navigation_spec.rb failed

Tasks: TOP => test => spec:unit
(See full trace by running task with --trace)
````