Sha256: 3a5712cf3a4c02c9022763bc775cc9357d6ed5c7279419e5001bb3abee29ee52

Contents?: true

Size: 1.04 KB

Versions: 15

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'

describe Stasis::Layout do

  before(:all) do
    generate
  end
  
  it "should render root layouts" do
    $files['layout_action.html'].should =~ /layout\nroot\npass/
    $files['layout_action_from_subdirectory.html'].should =~ /layout\nsubdirectory\npass/
    $files['layout_controller.html'].should =~ /layout\nroot\npass/
    $files['layout_controller_from_subdirectory.html'].should =~ /layout\nsubdirectory\npass/
  end

  it "should render subdirectory layouts" do
    $files['subdirectory/layout_action.html'].should =~ /layout\nsubdirectory\npass/
    $files['subdirectory/layout_action_from_root.html'].should =~ /layout\nroot\npass/
    $files['subdirectory/layout_controller.html'].should =~ /layout\nsubdirectory\npass/
    $files['subdirectory/layout_controller_from_root.html'].should =~ /layout\nroot\npass/
  end

  it "should use layouts on matching extensions" do
    $files['erb.html'].should =~ /erb layout/
    $files['erb.html'].should =~ /erb template/
    $files['css.css'].should_not =~ /erb layout/
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
stasis-0.2.0 spec/stasis/plugins/layout_spec.rb
stasis-0.2.0.pre spec/stasis/plugins/layout_spec.rb
stasis-0.1.23 spec/stasis/plugins/layout_spec.rb
stasis-0.1.22 spec/stasis/plugins/layout_spec.rb
stasis-0.1.21 spec/stasis/plugins/layout_spec.rb
stasis-0.1.20 spec/stasis/plugins/layout_spec.rb
stasis-0.1.19 spec/stasis/plugins/layout_spec.rb
stasis-0.1.18 spec/stasis/plugins/layout_spec.rb
stasis-0.1.17 spec/stasis/plugins/layout_spec.rb
stasis-0.1.16 spec/stasis/plugins/layout_spec.rb
stasis-0.1.15 spec/stasis/plugins/layout_spec.rb
stasis-0.1.14 spec/stasis/plugins/layout_spec.rb
stasis-0.1.13 spec/stasis/plugins/layout_spec.rb
stasis-0.1.12 spec/stasis/plugins/layout_spec.rb
stasis-0.1.11 spec/stasis/plugins/layout_spec.rb