Sha256: 457f7681adafac849d2a58333e63b4f6037f1ddb1651bf7b7fcab9c0eebb8440
Contents?: true
Size: 769 Bytes
Versions: 5
Compression:
Stored size: 769 Bytes
Contents
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the MIT license. shared :template_spec do behaves_like :rack_test def spec_template(spec_engine) it 'works on /' do get('/').body.strip. should =~ %r{<a href\s*=\s*"/">Home</a>\s+\|\s+<a href\s*=\s*"/internal">internal</a>\s+\|\s+<a href\s*=\s*"/external">external</a>} end %w[/internal /external].each do |url| it "works on #{url}" do html = get(url).body html.should.not == nil html.should =~ %r{<title>Template::#{spec_engine} (internal|external)</title>} html.should =~ %r{<h1>The (internal|external) Template for #{spec_engine}</h1>} end end end end
Version data entries
5 entries across 5 versions & 1 rubygems