Sha256: 961f7aed5b3731884b77d7ad76b9333f791213f7b594246904027a5fadb343e1

Contents?: true

Size: 980 Bytes

Versions: 6

Compression:

Stored size: 980 Bytes

Contents

require 'support/test_helper'

module RubySlippers::Engine
  context Article do
    setup do
      @config = RubySlippers::Engine::Config.new(:markdown => true, :author => AUTHOR, :url => URL)
      @ruby_slippers = Rack::MockRequest.new(RubySlippers::Engine::App.new(@config))

      RubySlippers::Engine::Paths[:articles]  = "test/fixtures/articles"
      if File.expand_path("../../", __FILE__) =~ /engine/
        RubySlippers::Engine::Paths[:templates] = "test/fixtures/templates"
        RubySlippers::Engine::Paths[:pages]     = "test/fixtures/pages"
      end
    end

    context "GET /index.xml (atom feed)" do
      setup { @ruby_slippers.get('/index.xml') }
      asserts("content type is set properly") { topic.content_type }.equals "application/xml"
      asserts("body should be valid xml")     { topic.body }.includes_html("feed > entry" => /.+/)
      asserts("summary shouldn't be empty")   { topic.body }.includes_html("summary" => /.{10,}/)
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-slippers-0.1.11 test/integration/atom_test.rb
ruby-slippers-0.1.7 test/integration/atom_test.rb
ruby-slippers-0.1.2 test/integration/atom_test.rb
ruby-slippers-0.1.1 test/integration/atom_test.rb
ruby-slippers-0.0.26 test/integration/atom_test.rb
ruby-slippers-0.0.25 test/integration/atom_test.rb