Sha256: 9011f0b5237680a2445bcfe0e4aacede2f6385c97886b56c346214e247843df9

Contents?: true

Size: 755 Bytes

Versions: 26

Compression:

Stored size: 755 Bytes

Contents

require 'spec_helper'

describe Stasis::Priority do

  before(:all) do
    generate
  end
  
  it "should prioritize to top" do
    # One of these will render a partial, so grabbing the top 3 instead of 2.
    top_3 = $render_order[0..2]
    top_3.any? { |p| p == "#{$fixture}/subdirectory/before_render_partial.html.haml" }.should == true
    top_3.any? { |p| p == "#{$fixture}/before_render_partial.html.haml" }.should == true
  end

  it "should prioritize to bottom" do
    # These both render two partials each, so grab the bottom 6 instead of 2.
    bot_6 = $render_order[-6..-1]
    bot_6.any? { |p| p == "#{$fixture}/subdirectory/index.html.haml" }.should == true
    bot_6.any? { |p| p == "#{$fixture}/index.html.haml" }.should == true
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
stasis-0.2.0 spec/stasis/plugins/priority_spec.rb
stasis-0.2.0.pre spec/stasis/plugins/priority_spec.rb
stasis-0.1.23 spec/stasis/plugins/priority_spec.rb
stasis-0.1.22 spec/stasis/plugins/priority_spec.rb
stasis-0.1.21 spec/stasis/plugins/priority_spec.rb
stasis-0.1.20 spec/stasis/plugins/priority_spec.rb
stasis-0.1.19 spec/stasis/plugins/priority_spec.rb
stasis-0.1.18 spec/stasis/plugins/priority_spec.rb
stasis-0.1.17 spec/stasis/plugins/priority_spec.rb
stasis-0.1.16 spec/stasis/plugins/priority_spec.rb
stasis-0.1.15 spec/stasis/plugins/priority_spec.rb
stasis-0.1.14 spec/stasis/plugins/priority_spec.rb
stasis-0.1.13 spec/stasis/plugins/priority_spec.rb
stasis-0.1.12 spec/stasis/plugins/priority_spec.rb
stasis-0.1.11 spec/stasis/plugins/priority_spec.rb
stasis-0.1.10 spec/stasis/plugins/priority_spec.rb
stasis-0.1.9 spec/stasis/plugins/priority_spec.rb
stasis-0.1.8 spec/stasis/plugins/priority_spec.rb
stasis-0.1.7 spec/stasis/plugins/priority_spec.rb
stasis-0.1.6 spec/stasis/plugins/priority_spec.rb