spec/lib/simple_navigation/renderer/base_spec.rb in simple-navigation-1.4.2 vs spec/lib/simple_navigation/renderer/base_spec.rb in simple-navigation-2.0.0
- old
+ new
@@ -2,11 +2,11 @@
describe SimpleNavigation::Renderer::Base do
before(:each) do
@controller = stub(:controller)
SimpleNavigation.stub!(:controller).and_return(@controller)
- @base_renderer = SimpleNavigation::Renderer::Base.new(:current_primary, :current_secondary)
+ @base_renderer = SimpleNavigation::Renderer::Base.new
end
it "should inclue ActionView::Helpers::UrlHelper" do
@base_renderer.should respond_to(:link_to)
end
it "should include ActionView::Helpers::TagHelper" do
@@ -18,12 +18,10 @@
it {@base_renderer.should respond_to(:protect_against_forgery?)}
it {@base_renderer.should respond_to(:request_forgery_protection_token)}
end
describe 'initialize' do
- it {@base_renderer.current_navigation.should == :current_primary}
- it {@base_renderer.current_sub_navigation.should == :current_secondary}
it {@base_renderer.controller.should == @controller}
end
describe 'controller_method' do
context 'delegate a single method' do
@@ -51,6 +49,12 @@
@base_renderer.test2
end
end
end
+ describe 'render' do
+ it "be subclass responsability" do
+ lambda {@base_renderer.render(:container)}.should raise_error('subclass responsibility')
+ end
+ end
+
end