Sha256: a34c27836f5289929df3e1e0c003f07c467f5778bfa5513a7b4bb8caee771b75
Contents?: true
Size: 721 Bytes
Versions: 28
Compression:
Stored size: 721 Bytes
Contents
require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__))) describe "static plugin" do it "adds support for serving static files" do app(:bare) do plugin :static, ['/about'], :root=>'spec/views' route do 'a' end end body.must_equal 'a' body('/about/_test.erb').must_equal File.read('spec/views/about/_test.erb') end it "respects the application's :root option" do app(:bare) do opts[:root] = File.expand_path('../../', __FILE__) plugin :static, ['/about'], :root=>'views' route do 'a' end end body.must_equal 'a' body('/about/_test.erb').must_equal File.read('spec/views/about/_test.erb') end end
Version data entries
28 entries across 28 versions & 1 rubygems