Sha256: 00f9fc227465241a8816198985992678d586e0546442fcaf8f273c87baa0ca02
Contents?: true
Size: 889 Bytes
Versions: 8
Compression:
Stored size: 889 Bytes
Contents
require 'spec_helper' describe "A controller acting as an AssetsController", :shared => true do attr_reader :format integrate_views before do load_view_fixtures(@controller.class) end describe "response" do context "with a matching file found in 'public'" do it "renders that file" do get :show, :path => 'dual', :format => format response.body.should match("dual.#{format}, should be rendered") end end context "with a matching file found in 'app'" do it "renders that file" do get :show, :path => 'solo', :format => format response.body.should match("solo.#{format}.erb, should be rendered") end end context "without a matching file" do it "renders 404" do get :show, :path => 'none', :format => format response.response_code.should == 404 end end end end
Version data entries
8 entries across 8 versions & 1 rubygems