spec/lib/simple_navigation/renderer/base_spec.rb in simple-navigation-2.4.2 vs spec/lib/simple_navigation/renderer/base_spec.rb in simple-navigation-2.5.0

- old
+ new

@@ -57,9 +57,25 @@ it "be subclass responsability" do lambda {@base_renderer.render(:container)}.should raise_error('subclass responsibility') end end + describe 'html_safe' do + before(:each) do + @input = stub :input + end + context 'input does respond to html_safe' do + before(:each) do + @safe = stub :safe + @input.stub!(:html_safe => @safe) + end + it {@base_renderer.html_safe(@input).should == @safe} + end + context 'input does not respond to html_safe' do + it {@base_renderer.html_safe(@input).should == @input} + end + end + describe 'expand_all?' do context 'option is set' do context 'expand_all is true' do before(:each) do @base_renderer.stub!(:options => {:expand_all => true})