Sha256: 3ddcbb3a784613a6ba51b839ce2187e299ab9536876a06e4f1e2240b41143e85

Contents?: true

Size: 756 Bytes

Versions: 22

Compression:

Stored size: 756 Bytes

Contents

require 'spec_helper'

describe SimpleNavigation::Adapters::Padrino do

  def create_adapter
    SimpleNavigation::Adapters::Padrino.new(@context)
  end
  
  before(:each) do
    @request = stub(:request)
    @context = stub(:context, :request => @request)
    @adapter = create_adapter
  end
  
  describe 'link_to' do
    it "should delegate to context" do
      @context.should_receive(:link_to).with('name', 'url', :my_option => true)
      @adapter.link_to('name', 'url', :my_option => true)
    end
  end
  
  describe 'content_tag' do
    it "should delegate to context" do
      @context.should_receive(:content_tag).with('type', 'content', :my_option => true)
      @adapter.content_tag('type', 'content', :my_option => true)
    end
  end
  
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
simple-navigation-3.10.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.9.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.8.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.7.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.6.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.5.1 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.5.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.4.2 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.4.1 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.4.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.3.4 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.3.3 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.3.2 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.3.1 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.3.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.2.0 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-ext-0.0.2 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-ext-0.0.1 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.1.1 spec/lib/simple_navigation/adapters/padrino_spec.rb
simple-navigation-3.1.0 spec/lib/simple_navigation/adapters/padrino_spec.rb