Sha256: 36925ecf8e6dae045b6855fe3069158d37db175c55a0cbbbb500b2807dbd2e87

Contents?: true

Size: 1.02 KB

Versions: 32

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

verify = lambda { |output|
  output.should =~ %r(<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;url=http://google.com"></head></html>)
}
verify_with_interpol = lambda { |output|
  output.should =~ %r(<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;url=http://mysite/bacon/"></head></html>)
}

theories =
    [
        {
            :page => "simple-redirect-page.redirect",
            :simple_name => "simple-redirect-page",
            :syntax => :text,
            :extension => '.html',
            :matcher => verify
        },
        {
            :page => "redirect-page.redirect",
            :simple_name => "redirect-page",
            :syntax => :text,
            :extension => '.html',
            :matcher => verify_with_interpol,
            :site_overrides => { :interpolate => true, :crunchy => 'bacon', :base_url => 'http://mysite' }
        }
    ]


describe Awestruct::Handlers::TiltHandler.to_s + "-Redirect" do
  it_should_behave_like "a handler", theories
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
awestruct-0.6.7 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.6 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.5 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.4 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.3 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.2 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.1 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.0 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.0.RC1 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.0.alpha4 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.0.alpha3 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.6.0.alpha1 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.7 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.7.RC2 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.7.RC1 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.6 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.6.beta9 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.6.beta8 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.6.beta7 spec/awestruct/handlers/redirect_handler_spec.rb
awestruct-0.5.6.beta6 spec/awestruct/handlers/redirect_handler_spec.rb