Sha256: b7710d04f7c4941f7ec43284c8ecaa4e9e99de719be28db880f8b15264f4d738
Contents?: true
Size: 1.24 KB
Versions: 5
Compression:
Stored size: 1.24 KB
Contents
require 'support/test_helper' module RubySlippers::Engine context "Archive Routes" 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 to the archive" do context "through a year" do setup { @ruby_slippers.get('/2011') } asserts("return a 200") { topic.status }.equals 200 should("include the entries for that year") { topic.body }.includes_elements("div.archived_article", 1) end context "through a year & month" do setup { @ruby_slippers.get('/2011/05') } asserts("return a 200") { topic.status }.equals 200 should("include the entries for that month") { topic.body }.includes_elements("div.archived_article", 1) should("include the year & month") { topic.body }.includes_html("h1" => /2011\/05/) end context "through /archives" do setup { @ruby_slippers.get('/archives') } end end end end
Version data entries
5 entries across 5 versions & 1 rubygems