Sha256: 29501b76feadca54d86bf6597e3eeea4899a9e62470b34cb1675a7338d8957df

Contents?: true

Size: 919 Bytes

Versions: 4

Compression:

Stored size: 919 Bytes

Contents

require 'spec_helper'

describe 'PostsController routes' do
  
  it "should route /code to posts#index with tag code" do
    get("/code").should route_to("enki/posts#index", :tag => 'code')
  end
    
  it "should route /posts.atmo to posts#index format atom" do
    get("/posts.atom").should route_to("enki/posts#index", :format => 'atom')
  end
    
  it "should route /pages to posts#index with tag pages" do
    get("/pages").should route_to('enki/posts#index', :tag => 'pages')
  end
    
  it "should route /code.atmo to posts#index tag: code and format: atom" do
    get("/code.atom").should route_to("enki/posts#index", :tag => "code", :format => 'atom')
  end

  it "should route /2008/02/01/a-post to posts#show with year: 2008, month: 02, day: 01, slug: a-post" do
    get("/2008/02/01/a-post").should route_to("enki/posts#show", :year => '2008', :month => '02', :day => '01', :slug => 'a-post')
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
enki-engine-0.0.5 spec/routing/posts_routing_spec.rb
enki-engine-0.0.4 spec/routing/posts_routing_spec.rb
enki-engine-0.0.3 spec/routing/posts_routing_spec.rb
enki-engine-0.0.2 spec/routing/posts_routing_spec.rb