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