Sha256: f90e381b492fcdb41834517adf69353783510f584436b41ed1f86dd8b30a06ed

Contents?: true

Size: 951 Bytes

Versions: 3

Compression:

Stored size: 951 Bytes

Contents

require 'spec/spec_helper'

describe "esi choose" do
  
 it "should pick the first available choice" do
   build_app('spec/tags/fixtures/choose/simple1.html', {}).last.should == ["<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n    Hey you\n  </body></html>\n"]
 end
 
 it "should pick next available choice" do
   build_app('spec/tags/fixtures/choose/simple2.html', {}).last.should == ["<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>\n    And you\n  </body></html>\n"]
 end
 
 it "should take the otherwise block if there is no valid choice" do
   build_app('spec/tags/fixtures/choose/simple3.html', {}).last.should == ["<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body> \n    No good\n  </body></html>\n"]
 end

  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
joshbuddy-esi-for-rack-0.0.1 spec/tags/choose_spec.rb
joshbuddy-esi-for-rack-0.0.2 spec/tags/choose_spec.rb
joshbuddy-esi-for-rack-0.0.3 spec/tags/choose_spec.rb