test/applications/main/test/integration/actions_test.rb in tabulous-0.0.2 vs test/applications/main/test/integration/actions_test.rb in tabulous-1.0.0

- old
+ new

@@ -1,44 +1,48 @@ require File.expand_path("../integration_test_helper", File.dirname(__FILE__)) class ActionsTest < ActionController::IntegrationTest def setup - use_initializer %Q{ + use_tab_file %Q{ Tabulous.setup do |config| - config.tabs = [ - #------------------------------------------------------------------------------------------------------# - # TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? # - #------------------------------------------------------------------------------------------------------# - [ :home_tab , 'Explanation' , "/" , true , true ], - [ :galaxies_tab , 'Galaxies' , "/galaxies" , true , true ], - [ :stars_tab , 'Stars' , "/stars" , true , true ], - [ :planets_tab , 'Planets' , "/planets" , true , true ], - [ :subtabs_tab , 'Subtabs' , "/subtabs/one" , true , true ], - [ :one_subtab , 'One' , "/subtabs/one" , true , true ], - [ :two_subtab , 'Two' , "/subtabs/two" , true , true ], - [ :three_subtab , 'Three' , "/subtabs/three" , true , true ], - #------------------------------------------------------------------------------------------------------# - # TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? # - #------------------------------------------------------------------------------------------------------# - ] + config.tabs do + [ + #------------------------------------------------------------------------------------------------------# + # TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? # + #------------------------------------------------------------------------------------------------------# + [ :home_tab , 'Explanation' , "/" , true , true ], + [ :galaxies_tab , 'Galaxies' , "/galaxies" , true , true ], + [ :stars_tab , 'Stars' , "/stars" , true , true ], + [ :planets_tab , 'Planets' , "/planets" , true , true ], + [ :subtabs_tab , 'Subtabs' , "/subtabs/one" , true , true ], + [ :one_subtab , 'One' , "/subtabs/one" , true , true ], + [ :two_subtab , 'Two' , "/subtabs/two" , true , true ], + [ :three_subtab , 'Three' , "/subtabs/three" , true , true ], + #------------------------------------------------------------------------------------------------------# + # TAB NAME | DISPLAY TEXT | PATH | VISIBLE? | ENABLED? # + #------------------------------------------------------------------------------------------------------# + ] + end - config.actions = [ - #-------------------------------------------------------------# - # CONTROLLER | ACTION | TAB # - #-------------------------------------------------------------# - [ :home , :index , :home_tab ], - [ :galaxies , :all_actions , :galaxies_tab ], - [ :stars , :all_actions , :stars_tab ], - [ :planets , :all_actions , :planets_tab ], - [ :subtabs , :one , :one_subtab ], - [ :subtabs , :two , :two_subtab ], - [ :subtabs , :three , :three_subtab ], - #-------------------------------------------------------------# - # CONTROLLER | ACTION | TAB # - #-------------------------------------------------------------# - ] + config.actions do + [ + #-------------------------------------------------------------# + # CONTROLLER | ACTION | TAB # + #-------------------------------------------------------------# + [ :home , :index , :home_tab ], + [ :galaxies , :all_actions , :galaxies_tab ], + [ :stars , :all_actions , :stars_tab ], + [ :planets , :all_actions , :planets_tab ], + [ :subtabs , :one , :one_subtab ], + [ :subtabs , :two , :two_subtab ], + [ :subtabs , :three , :three_subtab ], + #-------------------------------------------------------------# + # CONTROLLER | ACTION | TAB # + #-------------------------------------------------------------# + ] + end config.css.scaffolding = true end }