menu_helper 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
2
 
3
3
  class HtmlElementByDefaultTest < Test::Unit::TestCase
4
4
  def setup
5
- @element = PluginAWeek::MenuHelper::HtmlElement.new
5
+ @element = MenuHelper::HtmlElement.new
6
6
  end
7
7
 
8
8
  def test_should_generate_an_empty_tag
@@ -10,25 +10,25 @@ class HtmlElementByDefaultTest < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  def test_not_have_any_html_options
13
- element = PluginAWeek::MenuHelper::HtmlElement.new
13
+ element = MenuHelper::HtmlElement.new
14
14
  assert_nil element[:class]
15
15
  end
16
16
  end
17
17
 
18
18
  class HtmlElementTest < Test::Unit::TestCase
19
- class DivElement < PluginAWeek::MenuHelper::HtmlElement
19
+ class DivElement < MenuHelper::HtmlElement
20
20
  def tag_name
21
21
  'div'
22
22
  end
23
23
  end
24
24
 
25
25
  def test_should_set_html_options_on_initialization
26
- element = PluginAWeek::MenuHelper::HtmlElement.new(:class => 'fancy')
26
+ element = MenuHelper::HtmlElement.new(:class => 'fancy')
27
27
  assert_equal 'fancy', element[:class]
28
28
  end
29
29
 
30
30
  def test_should_symbolize_html_options
31
- element = PluginAWeek::MenuHelper::HtmlElement.new('class' => 'fancy')
31
+ element = MenuHelper::HtmlElement.new('class' => 'fancy')
32
32
  assert_equal 'fancy', element[:class]
33
33
  end
34
34
 
@@ -51,14 +51,14 @@ class HtmlElementTest < Test::Unit::TestCase
51
51
  end
52
52
 
53
53
  def test_should_save_changes_in_html_options
54
- element = PluginAWeek::MenuHelper::HtmlElement.new
54
+ element = MenuHelper::HtmlElement.new
55
55
  element[:float] = 'left'
56
56
  assert_equal 'left', element[:float]
57
57
  end
58
58
  end
59
59
 
60
60
  class HtmlElementWithNoContentTest < Test::Unit::TestCase
61
- class DivElement < PluginAWeek::MenuHelper::HtmlElement
61
+ class DivElement < MenuHelper::HtmlElement
62
62
  def tag_name
63
63
  'div'
64
64
  end
@@ -4,7 +4,7 @@ class MenuBarByDefaultTest < Test::Unit::TestCase
4
4
  def setup
5
5
  super
6
6
 
7
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
7
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
8
8
  end
9
9
 
10
10
  def test_should_have_no_menus
@@ -53,13 +53,13 @@ class MenuBarByDefaultTest < Test::Unit::TestCase
53
53
  end
54
54
 
55
55
  def test_should_allow_css_classes_to_be_customized
56
- @original_menu_bar_class = PluginAWeek::MenuHelper::MenuBar.menu_bar_class
57
- PluginAWeek::MenuHelper::MenuBar.menu_bar_class = 'menus'
56
+ @original_menu_bar_class = MenuHelper::MenuBar.menu_bar_class
57
+ MenuHelper::MenuBar.menu_bar_class = 'menus'
58
58
 
59
- menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
59
+ menu_bar = MenuHelper::MenuBar.new(@controller)
60
60
  assert_equal 'menus menus-1', menu_bar[:class]
61
61
  ensure
62
- PluginAWeek::MenuHelper::MenuBar.menu_bar_class = @original_menu_bar_class
62
+ MenuHelper::MenuBar.menu_bar_class = @original_menu_bar_class
63
63
  end
64
64
 
65
65
  def test_should_not_set_id
@@ -71,16 +71,16 @@ class MenuBarTest < Test::Unit::TestCase
71
71
  def setup
72
72
  super
73
73
 
74
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
74
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
75
75
  end
76
76
 
77
77
  def test_should_raise_exception_if_invalid_option_specified
78
- assert_raise(ArgumentError) {PluginAWeek::MenuHelper::MenuBar.new(@controller, :invalid => true)}
78
+ assert_raise(ArgumentError) {MenuHelper::MenuBar.new(@controller, :invalid => true)}
79
79
  end
80
80
 
81
81
  def test_should_accept_block
82
82
  in_block = false
83
- menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller) do |menu_bar|
83
+ menu_bar = MenuHelper::MenuBar.new(@controller) do |menu_bar|
84
84
  in_block = true
85
85
  end
86
86
 
@@ -106,7 +106,7 @@ class MenuBarWithoutMenusTest < Test::Unit::TestCase
106
106
  def setup
107
107
  super
108
108
 
109
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
109
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
110
110
  end
111
111
 
112
112
  def test_should_not_have_any_menus
@@ -126,7 +126,7 @@ class MenuBarWithCustomHtmlOptionsTest < Test::Unit::TestCase
126
126
  def setup
127
127
  super
128
128
 
129
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, {}, :id => 'menus', :class => 'pretty')
129
+ @menu_bar = MenuHelper::MenuBar.new(@controller, {}, :id => 'menus', :class => 'pretty')
130
130
  end
131
131
 
132
132
  def test_should_render_with_custom_options
@@ -138,7 +138,7 @@ class MenuBarWithCustomContentForTest < Test::Unit::TestCase
138
138
  def setup
139
139
  super
140
140
 
141
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, :content_for => 'menus')
141
+ @menu_bar = MenuHelper::MenuBar.new(@controller, :content_for => 'menus')
142
142
  end
143
143
 
144
144
  def test_should_have_a_content_for_variable_based_on_options
@@ -150,7 +150,7 @@ class MenuBarWithMenusTest < Test::Unit::TestCase
150
150
  def setup
151
151
  super
152
152
 
153
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, {}, :id => 'menus') do |main|
153
+ @menu_bar = MenuHelper::MenuBar.new(@controller, {}, :id => 'menus') do |main|
154
154
  main.menu :home
155
155
  main.menu :about_us, 'About'
156
156
  end
@@ -171,7 +171,7 @@ class MenuBarWithSelectedMenuTest < Test::Unit::TestCase
171
171
  def setup
172
172
  super
173
173
 
174
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller) do |main|
174
+ @menu_bar = MenuHelper::MenuBar.new(@controller) do |main|
175
175
  main.menu :contact
176
176
  end
177
177
  end
@@ -194,7 +194,7 @@ class MenuBarWithoutAutoIdSettingTest < Test::Unit::TestCase
194
194
  def setup
195
195
  super
196
196
 
197
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, {:auto_set_ids => false}, :id => 'menus') do |main|
197
+ @menu_bar = MenuHelper::MenuBar.new(@controller, {:auto_set_ids => false}, :id => 'menus') do |main|
198
198
  main.menu :home
199
199
  end
200
200
  end
@@ -213,7 +213,7 @@ class MenuBarUnselectedWithDetachedActiveSubmenus < Test::Unit::TestCase
213
213
  def setup
214
214
  super
215
215
 
216
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false) do |main|
216
+ @menu_bar = MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false) do |main|
217
217
  main.menu :home do |home|
218
218
  home.menu :about_us
219
219
  end
@@ -242,7 +242,7 @@ class MenuBarSelectedWithDetachedActiveSubmenus < Test::Unit::TestCase
242
242
  def setup
243
243
  super
244
244
 
245
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false) do |main|
245
+ @menu_bar = MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false) do |main|
246
246
  main.menu :contact do |contact|
247
247
  contact.menu :investors
248
248
  end
@@ -275,9 +275,9 @@ class MenuBarWithParentMenuTest < Test::Unit::TestCase
275
275
  def setup
276
276
  super
277
277
 
278
- @parent_menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
279
- @parent_menu = PluginAWeek::MenuHelper::Menu.new(@parent_menu_bar, :home)
280
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, :parent_menu => @parent_menu)
278
+ @parent_menu_bar = MenuHelper::MenuBar.new(@controller)
279
+ @parent_menu = MenuHelper::Menu.new(@parent_menu_bar, :home)
280
+ @menu_bar = MenuHelper::MenuBar.new(@controller, :parent_menu => @parent_menu)
281
281
  end
282
282
 
283
283
  def test_should_have_a_parent_menu
@@ -293,9 +293,9 @@ class MenuBarWithParentMenuAndSelectedMenuTest < Test::Unit::TestCase
293
293
  def setup
294
294
  super
295
295
 
296
- @parent_menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
297
- @parent_menu = PluginAWeek::MenuHelper::Menu.new(@parent_menu_bar, :about_us)
298
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, :parent_menu => @parent_menu) do |about_us|
296
+ @parent_menu_bar = MenuHelper::MenuBar.new(@controller)
297
+ @parent_menu = MenuHelper::Menu.new(@parent_menu_bar, :about_us)
298
+ @menu_bar = MenuHelper::MenuBar.new(@controller, :parent_menu => @parent_menu) do |about_us|
299
299
  about_us.menu :contact
300
300
  end
301
301
  end
@@ -4,8 +4,8 @@ class MenuByDefaultTest < Test::Unit::TestCase
4
4
  def setup
5
5
  super
6
6
 
7
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
8
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
7
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
8
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
9
9
  end
10
10
 
11
11
  def test_should_have_a_name
@@ -45,13 +45,13 @@ class MenuTest < Test::Unit::TestCase
45
45
  def setup
46
46
  super
47
47
 
48
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
49
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
48
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
49
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
50
50
  end
51
51
 
52
52
  def test_should_accept_a_block
53
53
  in_block = false
54
- menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home) do |menu|
54
+ menu = MenuHelper::Menu.new(@menu_bar, :home) do |menu|
55
55
  in_block = true
56
56
  end
57
57
 
@@ -68,12 +68,12 @@ class MenuTest < Test::Unit::TestCase
68
68
  end
69
69
 
70
70
  def test_should_allow_last_class_to_be_customized
71
- @original_last_class = PluginAWeek::MenuHelper::Menu.last_class
72
- PluginAWeek::MenuHelper::Menu.last_class = 'menubar-end'
71
+ @original_last_class = MenuHelper::Menu.last_class
72
+ MenuHelper::Menu.last_class = 'menubar-end'
73
73
 
74
74
  assert_equal '<li class="menubar-end"><a href="http://test.host/home"><span>Home</span></a></li>', @menu.html(true)
75
75
  ensure
76
- PluginAWeek::MenuHelper::Menu.last_class = @original_last_class
76
+ MenuHelper::Menu.last_class = @original_last_class
77
77
  end
78
78
 
79
79
  def test_should_not_modify_html_options_after_building_html
@@ -90,8 +90,8 @@ class MenuWithMatchingNamedRouteTest < Test::Unit::TestCase
90
90
  map.home '', :controller => 'home', :action => 'index'
91
91
  end
92
92
 
93
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
94
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
93
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
94
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
95
95
  end
96
96
 
97
97
  def test_should_build_url_from_named_route
@@ -104,8 +104,8 @@ class MenuWithMatchingControllerTest < Test::Unit::TestCase
104
104
  def setup
105
105
  super
106
106
 
107
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
108
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
107
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
108
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
109
109
  end
110
110
 
111
111
  def test_should_use_name_as_controller
@@ -118,8 +118,8 @@ class MenuWithoutMatchingNamedRouteOrControllerTest < Test::Unit::TestCase
118
118
  def setup
119
119
  super
120
120
 
121
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
122
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :investors)
121
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
122
+ @menu = MenuHelper::Menu.new(@menu_bar, :investors)
123
123
  end
124
124
 
125
125
  def test_should_use_request_controller_as_controller_and_name_as_action
@@ -132,23 +132,23 @@ class MenuWithCustomUrlOptionsTest < Test::Unit::TestCase
132
132
  def setup
133
133
  super
134
134
 
135
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
135
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
136
136
  end
137
137
 
138
138
  def test_should_use_custom_controller_if_specified
139
- menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :privacy_policy, :controller => 'home')
139
+ menu = MenuHelper::Menu.new(@menu_bar, :privacy_policy, :controller => 'home')
140
140
  expected = {:controller => 'home', :action => 'privacy_policy', :only_path => false}
141
141
  assert_equal expected, menu.url_options
142
142
  end
143
143
 
144
144
  def test_should_not_use_name_as_action_if_same_as_controller_name
145
- menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :about_us, :controller => 'about_us')
145
+ menu = MenuHelper::Menu.new(@menu_bar, :about_us, :controller => 'about_us')
146
146
  expected = {:controller => 'about_us', :only_path => false}
147
147
  assert_equal expected, menu.url_options
148
148
  end
149
149
 
150
150
  def test_should_use_custom_action_if_specified
151
- menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :privacy_policy, :controller => 'home', :action => 'privacy')
151
+ menu = MenuHelper::Menu.new(@menu_bar, :privacy_policy, :controller => 'home', :action => 'privacy')
152
152
  expected = {:controller => 'home', :action => 'privacy', :only_path => false}
153
153
  assert_equal expected, menu.url_options
154
154
  end
@@ -158,8 +158,8 @@ class MenuWithSpecificUrlTest < Test::Unit::TestCase
158
158
  def setup
159
159
  super
160
160
 
161
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
162
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :search, 'Search', 'http://www.google.com')
161
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
162
+ @menu = MenuHelper::Menu.new(@menu_bar, :search, 'Search', 'http://www.google.com')
163
163
  end
164
164
 
165
165
  def test_should_use_exact_url
@@ -171,8 +171,8 @@ class MenuWithMenubarId < Test::Unit::TestCase
171
171
  def setup
172
172
  super
173
173
 
174
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, {}, :id => 'menus')
175
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
174
+ @menu_bar = MenuHelper::MenuBar.new(@controller, {}, :id => 'menus')
175
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
176
176
  end
177
177
 
178
178
  def test_should_prefix_menu_id_with_menu_bar_id
@@ -184,8 +184,8 @@ class MenuWithoutContentTest < Test::Unit::TestCase
184
184
  def setup
185
185
  super
186
186
 
187
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
188
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
187
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
188
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
189
189
  end
190
190
 
191
191
  def test_should_use_titleized_version_of_name_as_content
@@ -197,8 +197,8 @@ class MenuWithCustomContentTest < Test::Unit::TestCase
197
197
  def setup
198
198
  super
199
199
 
200
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
201
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home, 'My Home')
200
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
201
+ @menu = MenuHelper::Menu.new(@menu_bar, :home, 'My Home')
202
202
  end
203
203
 
204
204
  def test_should_use_custom_content_as_content
@@ -210,8 +210,8 @@ class MenuWithoutLinkingTest < Test::Unit::TestCase
210
210
  def setup
211
211
  super
212
212
 
213
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
214
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home, {}, :link => false)
213
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
214
+ @menu = MenuHelper::Menu.new(@menu_bar, :home, {}, :link => false)
215
215
  end
216
216
 
217
217
  def test_should_not_linkify_html
@@ -223,8 +223,8 @@ class MenuWithoutAutoIdSettingTest < Test::Unit::TestCase
223
223
  def setup
224
224
  super
225
225
 
226
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, {:auto_set_ids => false}, :id => 'menus')
227
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
226
+ @menu_bar = MenuHelper::MenuBar.new(@controller, {:auto_set_ids => false}, :id => 'menus')
227
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
228
228
  end
229
229
 
230
230
  def test_should_not_set_default_id
@@ -236,8 +236,8 @@ class MenuWhenNotCurrentPageTest < Test::Unit::TestCase
236
236
  def setup
237
237
  super
238
238
 
239
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
240
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
239
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
240
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
241
241
  end
242
242
 
243
243
  def test_should_not_be_selected
@@ -253,8 +253,8 @@ class MenuWhenCurrentPageTest < Test::Unit::TestCase
253
253
  def setup
254
254
  super
255
255
 
256
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
257
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :contact)
256
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
257
+ @menu = MenuHelper::Menu.new(@menu_bar, :contact)
258
258
  end
259
259
 
260
260
  def test_should_be_selected
@@ -271,11 +271,11 @@ class MenuWhenCurrentPageTest < Test::Unit::TestCase
271
271
  end
272
272
 
273
273
  def test_should_allow_selected_class_to_be_customized
274
- @original_selected_class = PluginAWeek::MenuHelper::Menu.selected_class
275
- PluginAWeek::MenuHelper::Menu.selected_class = 'menubar-active'
274
+ @original_selected_class = MenuHelper::Menu.selected_class
275
+ MenuHelper::Menu.selected_class = 'menubar-active'
276
276
  assert_equal '<li class="menubar-active"><a href="http://test.host/contact"><span>Contact</span></a></li>', @menu.html
277
277
  ensure
278
- PluginAWeek::MenuHelper::Menu.selected_class = @original_selected_class
278
+ MenuHelper::Menu.selected_class = @original_selected_class
279
279
  end
280
280
  end
281
281
 
@@ -283,8 +283,8 @@ class MenuWithoutSubmenusTest < Test::Unit::TestCase
283
283
  def setup
284
284
  super
285
285
 
286
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
287
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home)
286
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
287
+ @menu = MenuHelper::Menu.new(@menu_bar, :home)
288
288
  end
289
289
 
290
290
  def test_should_not_render_a_menu_bar
@@ -296,8 +296,8 @@ class MenuWithSubmenusTest < Test::Unit::TestCase
296
296
  def setup
297
297
  super
298
298
 
299
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
300
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home) do |home|
299
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
300
+ @menu = MenuHelper::Menu.new(@menu_bar, :home) do |home|
301
301
  home.menu :about_us do |about_us|
302
302
  about_us.menu :who_we_are
303
303
  end
@@ -324,8 +324,8 @@ class MenuUnselectedWithDetachedActiveSubmenusTest < Test::Unit::TestCase
324
324
  def setup
325
325
  super
326
326
 
327
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false)
328
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :home) do |home|
327
+ @menu_bar = MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false)
328
+ @menu = MenuHelper::Menu.new(@menu_bar, :home) do |home|
329
329
  home.menu :about_us
330
330
  end
331
331
  end
@@ -350,8 +350,8 @@ class MenuSelectedWithDetachedActiveSubmenusTest < Test::Unit::TestCase
350
350
  def setup
351
351
  super
352
352
 
353
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false)
354
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :contact) do |contact|
353
+ @menu_bar = MenuHelper::MenuBar.new(@controller, :attach_active_submenus => false)
354
+ @menu = MenuHelper::Menu.new(@menu_bar, :contact) do |contact|
355
355
  contact.menu :investors
356
356
  end
357
357
  end
@@ -377,8 +377,8 @@ class MenuWithSubmenuAsCurrentPageTest < Test::Unit::TestCase
377
377
  def setup
378
378
  super
379
379
 
380
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
381
- @menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :about_us) do |about_us|
380
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
381
+ @menu = MenuHelper::Menu.new(@menu_bar, :about_us) do |about_us|
382
382
  about_us.menu :contact
383
383
  end
384
384
  end
@@ -403,8 +403,8 @@ class MenuWithParentMenuTest < Test::Unit::TestCase
403
403
  def setup
404
404
  super
405
405
 
406
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
407
- @parent_menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :contact, {}, :id => 'contact')
406
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
407
+ @parent_menu = MenuHelper::Menu.new(@menu_bar, :contact, {}, :id => 'contact')
408
408
  @menu = @parent_menu.menu :investors
409
409
  end
410
410
 
@@ -426,8 +426,8 @@ class MenuWithParentMenuAndMatchingNamedRouteTest < Test::Unit::TestCase
426
426
  map.connect ':controller/:action/:id'
427
427
  end
428
428
 
429
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
430
- @parent_menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :contact)
429
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
430
+ @parent_menu = MenuHelper::Menu.new(@menu_bar, :contact)
431
431
  @menu = @parent_menu.menu :investors
432
432
  end
433
433
 
@@ -441,8 +441,8 @@ class MenuWithParentMenuAndMatchingControllerTest < Test::Unit::TestCase
441
441
  def setup
442
442
  super
443
443
 
444
- @menu_bar = PluginAWeek::MenuHelper::MenuBar.new(@controller)
445
- @parent_menu = PluginAWeek::MenuHelper::Menu.new(@menu_bar, :contact)
444
+ @menu_bar = MenuHelper::MenuBar.new(@controller)
445
+ @parent_menu = MenuHelper::Menu.new(@menu_bar, :contact)
446
446
  @menu = @parent_menu.menu :investors
447
447
  end
448
448
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: menu_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Pfeifer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-26 00:00:00 -04:00
12
+ date: 2008-12-14 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,26 +22,26 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
- - lib/menu_helper.rb
26
25
  - lib/menu_helper
27
- - lib/menu_helper/menu.rb
28
26
  - lib/menu_helper/html_element.rb
27
+ - lib/menu_helper/menu.rb
29
28
  - lib/menu_helper/menu_bar.rb
30
- - test/app_root
31
- - test/app_root/app
32
- - test/app_root/app/controllers
33
- - test/app_root/app/controllers/home_controller.rb
34
- - test/app_root/app/controllers/about_us_controller.rb
35
- - test/app_root/app/controllers/contact_controller.rb
36
- - test/app_root/config
37
- - test/app_root/config/routes.rb
29
+ - lib/menu_helper.rb
38
30
  - test/test_helper.rb
39
31
  - test/unit
40
32
  - test/unit/menu_bar_test.rb
41
- - test/unit/menu_test.rb
42
33
  - test/unit/html_element_test.rb
34
+ - test/unit/menu_test.rb
43
35
  - test/helpers
44
36
  - test/helpers/menu_helper_test.rb
37
+ - test/app_root
38
+ - test/app_root/config
39
+ - test/app_root/config/routes.rb
40
+ - test/app_root/app
41
+ - test/app_root/app/controllers
42
+ - test/app_root/app/controllers/home_controller.rb
43
+ - test/app_root/app/controllers/contact_controller.rb
44
+ - test/app_root/app/controllers/about_us_controller.rb
45
45
  - CHANGELOG.rdoc
46
46
  - init.rb
47
47
  - LICENSE
@@ -75,6 +75,6 @@ specification_version: 2
75
75
  summary: Adds a helper method for generating a menubar
76
76
  test_files:
77
77
  - test/unit/menu_bar_test.rb
78
- - test/unit/menu_test.rb
79
78
  - test/unit/html_element_test.rb
79
+ - test/unit/menu_test.rb
80
80
  - test/helpers/menu_helper_test.rb