require File.expand_path('../../application_template_helper', __FILE__) generate_test_application do #***************************************************************************** # MODELS AND SCAFFOLDING generate(:scaffold, 'galaxy name:string --old-style-hash') generate(:scaffold, 'planet name:string --old-style-hash') generate(:scaffold, 'star name:string --old-style-hash') #***************************************************************************** # MORE CONTROLLERS AND VIEWS generate(:controller, 'home index --old-style-hash') replace_view 'home', 'index', <<-CODE.strip_heredoc

Explanation

This tests tabulous integrating with Twitter Bootstrap. CODE generate(:controller, 'no_tabs index --old-style-hash') replace_view 'no_tabs', 'index', <<-CODE.strip_heredoc

Explanation

This tests what happens when you visit a controller action that is not associated with any tab. CODE generate(:controller, 'subtabs one two three --old-style-hash') replace_view 'subtabs', 'one', '

Subtab #1

' replace_view 'subtabs', 'two', '

Subtab #2

' replace_view 'subtabs', 'three', '

Subtab #3

' #***************************************************************************** # MORE ROUTES route "root :to => 'home#index'" route "get 'notabs' => 'no_tabs#index'" #***************************************************************************** # LAYOUT replace_application_layout <<-CODE.strip_heredoc Bootstrap <%= csrf_meta_tag %> <%= stylesheet_link_tag 'application' %> <%= javascript_include_tag 'application' %>
<%= yield %>
CODE #***************************************************************************** # CSS CLEANUP remove_file 'app/assets/stylesheets/application.css' remove_file 'app/assets/stylesheets/scaffolds.css.scss' end