Sha256: ee4f2d92537991e4b14e7f93ad8903ff994cbb389578284da0029ae8528e5560

Contents?: true

Size: 615 Bytes

Versions: 8

Compression:

Stored size: 615 Bytes

Contents

shared :template_spec do
  behaves_like :mock

  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

8 entries across 8 versions & 3 rubygems

Version Path
manveru-ramaze-2009.06.04 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.06.12 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.06 lib/ramaze/spec/helper/template_examples.rb
rjspotter-ramaze-2009.06.29 lib/ramaze/spec/helper/template_examples.rb
rjspotter-ramaze-2009.06.31 lib/ramaze/spec/helper/template_examples.rb
ramaze-2009.06.04 lib/ramaze/spec/helper/template_examples.rb
ramaze-2009.06.12 lib/ramaze/spec/helper/template_examples.rb
ramaze-2009.06 lib/ramaze/spec/helper/template_examples.rb