Sha256: 2f5588965da92bd15dd8f2d0e24134b2a56e83298b614890a97ee96def7d4d62

Contents?: true

Size: 817 Bytes

Versions: 10

Compression:

Stored size: 817 Bytes

Contents

module Ramaze
  module Spec
    module Examples
      module Templates
        def self.tests( describe, spec_engine )

            describe.behaves_like :mock

            describe.it '/' 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|
              describe.it 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
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
Pistos-ramaze-2009.04.08 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.04.01 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.04.08 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.04.18 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.04.22 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.04 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.05.08 lib/ramaze/spec/helper/template_examples.rb
manveru-ramaze-2009.05 lib/ramaze/spec/helper/template_examples.rb
ramaze-2009.04 lib/ramaze/spec/helper/template_examples.rb
ramaze-2009.05 lib/ramaze/spec/helper/template_examples.rb