Sha256: 4446188c275fc828ab7284d803894f51de2b39d3621f7d821d7676a062f6ec81

Contents?: true

Size: 872 Bytes

Versions: 5

Compression:

Stored size: 872 Bytes

Contents

require 'support/test_helper'

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

      if File.expand_path("../../", __FILE__) =~ /engine/
        Paths[:articles]  = "test/fixtures/articles"
        Paths[:templates] = "test/fixtures/templates"
        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

5 entries across 5 versions & 1 rubygems

Version Path
ruby_slippers-0.2.15 test/integration/atom_test.rb
ruby_slippers-0.2.8 test/integration/atom_test.rb
ruby_slippers-0.2.4 test/integration/atom_test.rb
ruby_slippers-0.2.3 test/integration/atom_test.rb
ruby_slippers-0.2.0 test/integration/atom_test.rb