/amexsbs/railsapp/vendor/plugins/tab_tab/test/controller_methods_test.rb

https://bitbucket.org/AcireStudios/social-app-demo · Ruby · 25 lines · 19 code · 6 blank · 0 comment · 0 complexity · ccf9ef680a9abb575c295390d886f273 MD5 · raw file

  1. require File.join(File.dirname(__FILE__), 'test_helper')
  2. class ControllerMethodsTest < Test::Unit::TestCase
  3. def test_controller_level_tab
  4. assert_equal Tab.new(:stuff), StuffController.new.current_tab
  5. end
  6. def test_default_controller_level_tab
  7. assert_equal Tab.new(:bars), BarsController.new.current_tab
  8. end
  9. def test_action_level_tab
  10. assert_equal Tab.new(:stuff => :edit),
  11. StuffController.new.edit.current_tab
  12. end
  13. def test_default_action_level_tab
  14. assert_equal Tab.new(:stuff), StuffController.new.show.current_tab
  15. end
  16. def test_default_controller_and_action_level_tab
  17. assert_equal Tab.new(:bars), BarsController.new.show.current_tab
  18. end
  19. end