Sha256: 4f1472f71161a541f6c883e6b68953de2dd17231fff4fc27900dab928900349b

Contents?: true

Size: 770 Bytes

Versions: 14

Compression:

Stored size: 770 Bytes

Contents

#          Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby 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

14 entries across 14 versions & 3 rubygems

Version Path
Pistos-ramaze-2009.06.12 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.07 lib/ramaze/spec/helper/template_examples.rb
ramaze-2011.12.28 lib/ramaze/spec/helper/template_examples.rb
ramaze-2011.10.23 lib/ramaze/spec/helper/template_examples.rb
ramaze-2011.07.25 lib/ramaze/spec/helper/template_examples.rb
ramaze-2011.01.30 lib/ramaze/spec/helper/template_examples.rb
ramaze-2011.01 lib/ramaze/spec/helper/template_examples.rb
ramaze-2010.06.18 lib/ramaze/spec/helper/template_examples.rb
ramaze-2010.04.04 lib/ramaze/spec/helper/template_examples.rb
ramaze-2010.04 lib/ramaze/spec/helper/template_examples.rb
ramaze-2010.03 lib/ramaze/spec/helper/template_examples.rb
ramaze-2010.01 lib/ramaze/spec/helper/template_examples.rb
ramaze-2009.10 lib/ramaze/spec/helper/template_examples.rb
ramaze-2009.07 lib/ramaze/spec/helper/template_examples.rb