Sha256: 9e3d3305f7a756cd41aeba7ac926cd030232e055551f8eb562fd8e86eff4f043
Contents?: true
Size: 1.33 KB
Versions: 5
Compression:
Stored size: 1.33 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe LibraryPage do dataset :tags it "should be a Page" do page = LibraryPage.new page.is_a?(Page).should be_true end describe "on request" do describe "with one tag" do before do @page = Page.find_by_path('/library/colourless') end it "should interrupt find_by_path" do @page.should_not be_nil @page.should == pages(:library) @page.is_a?(LibraryPage).should be_true @page.respond_to?(:requested_tags).should be_true end it "should set tag context correctly" do @page.requested_tags.should == [tags(:colourless)] end end describe "with several tags" do before do @page = Page.find_by_path('/library/colourless/green/ideas') end it "should set tag context correctly" do @page.should_not be_nil @page.requested_tags.should == [tags(:colourless), tags(:green), tags(:ideas)] end end describe "with several tags and one tag negation" do before do @page = Page.find_by_path('/library/colourless/green/ideas/-green') end it "should set tag context correctly" do @page.should_not be_nil @page.requested_tags.should == [tags(:colourless), tags(:ideas)] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems