layout view:
<%= top_title %>
application helper:
def top_title
content_tag(:h1, 'Top Title')
end
helper spec:
require File.dirname(__FILE__) + '/../spec_helper'
describe ApplicationHelper do
describe 'top_title' do
top_title = mock('top_title')
self.should_receive(:top_title).and_return('Top Title')
end
end
error.. I've no idea how to do this. Please help me, I would appreciate
anyone who can give me a solution. Thanks!