Sha256: 587d02cb478f609cdf51e48e34c7e81431319610e1870350d848c81f5a886a2b
Contents?: true
Size: 938 Bytes
Versions: 5
Compression:
Stored size: 938 Bytes
Contents
require 'spec_helper' module SimpleNavigation module Adapters describe Padrino do let(:adapter) { SimpleNavigation::Adapters::Padrino.new(context) } let(:content) { double(:content) } let(:context) { double(:context, request: request) } let(:request) { double(:request) } describe '#link_to' do it 'delegates to context' do expect(context).to receive(:link_to) .with('name', 'url', :my_option => true) adapter.link_to('name', 'url', :my_option => true) end end describe '#content_tag' do it 'delegates to context' do expect(content).to receive(:html_safe).and_return('content') expect(context).to receive(:content_tag) .with('type', 'content', my_option: true) adapter.content_tag('type', content, my_option: true) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems