test/controller_test.rb in menu_builder-0.3.1 vs test/controller_test.rb in menu_builder-0.3.2

- old
+ new

@@ -9,16 +9,24 @@ class BooksController < ApplicationController menu_item :home def index end + + def show + menu_item :show + end end class MenuBuilderTest < ActionController::TestCase tests BooksController - test "should assigns the current tab" do + test "should assigns the current tab in class level" do get :index assert_equal(:home, assigns(:menu_item)) end + test "should assigns the current tab in action level" do + get :show + assert_equal(:show, assigns(:menu_item)) + end end \ No newline at end of file