Sha256: fc6cf20519b78ef07071d9062f23d76cd6658293d5d495f73db90704610fff68

Contents?: true

Size: 546 Bytes

Versions: 7

Compression:

Stored size: 546 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe ContentController do
  
  before(:each) do
    @page = mock("page")

    # Generally, prefer stub! over should_receive in setup.
    @page.stub!(:slug).and_return('/test')
    @page.stub!(:title).and_return('Testing 123')
    @page.stub!(:body).and_return('This is a test... cooool')
  end
  
  it "should use the catch all route to place path in path variable" do
    params_from(:get, "/foobar").should == {:controller => "content", :action => "show", :path=>["foobar"]}
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_static_content-0.60.1 spec/controllers/content_controller_spec.rb
spree_static_content-0.60.0 spec/controllers/content_controller_spec.rb
spree_static_content-0.40.2 spec/controllers/content_controller_spec.rb
spree_static_content-0.40.1 spec/controllers/content_controller_spec.rb
spree_static_content-0.40.0 spec/controllers/content_controller_spec.rb
spree_static_content-0.30.0 spec/controllers/content_controller_spec.rb
spree_static_content-0.30.0.beta1 spec/controllers/content_controller_spec.rb