simple-navigation 3.5.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ *3.5.1
2
+
3
+ * Fixed specs related to testing name_generator functionality - stub the name_generator method rather than calling it to ensure subsequent tests aren't affected.
4
+
1
5
  *3.5.0
2
6
 
3
7
  * Added (configurable) "simple-navigation-active-leaf" class to last selected element and elements that have :highlights_on return true. Thanks to Frank Schumacher (thenoseman).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.5.0
1
+ 3.5.1
@@ -45,7 +45,7 @@ describe SimpleNavigation::Helpers do
45
45
  context 'custom name generator set' do
46
46
  before(:each) do
47
47
  select_item(:subnav1)
48
- SimpleNavigation.config.name_generator = Proc.new {|name| "<span>name</span>"}
48
+ SimpleNavigation.config.stub!(:name_generator => Proc.new {|name| "<span>name</span>"})
49
49
  end
50
50
  it "should not apply the generator" do
51
51
  @controller.active_navigation_item_name(:level => 1).should == 'invoices'
@@ -33,7 +33,7 @@ describe SimpleNavigation::Renderer::List do
33
33
  context 'concerning item names' do
34
34
  context 'with a custom name generator defined' do
35
35
  before(:each) do
36
- SimpleNavigation.config.name_generator = Proc.new {|name| "<span>name</span>"}
36
+ SimpleNavigation.config.stub!(:name_generator => Proc.new {|name| "<span>name</span>"})
37
37
  end
38
38
  it "should apply the name generator" do
39
39
  HTML::Selector.new('li a span').select(render).should have(3).entries
@@ -41,7 +41,7 @@ describe SimpleNavigation::Renderer::List do
41
41
  end
42
42
  context 'no customer generator defined' do
43
43
  before(:each) do
44
- SimpleNavigation.config.name_generator = Proc.new {|name| "name"}
44
+ SimpleNavigation.config.stub!(:name_generator => Proc.new {|name| "name"})
45
45
  end
46
46
  it "should apply the name generator" do
47
47
  HTML::Selector.new('li a span').select(render).should have(0).entries
@@ -30,7 +30,7 @@ describe SimpleNavigation::Renderer::Text do
30
30
 
31
31
  context 'custom name generator is set' do
32
32
  before(:each) do
33
- SimpleNavigation.config.name_generator = Proc.new {|name| "<span>name</span>"}
33
+ SimpleNavigation.config.stub!(:name_generator => Proc.new {|name| "<span>name</span>"})
34
34
  end
35
35
  it "should not apply the name generator (since it is text only)" do
36
36
  render(:subnav1, :join_with => " | ").should == "invoices | subnav1"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-navigation
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 5
9
- - 0
10
- version: 3.5.0
9
+ - 1
10
+ version: 3.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andi Schacke
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-15 00:00:00 +01:00
19
+ date: 2011-11-19 00:00:00 +00:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency