Changeset 941
- Timestamp:
- 11/10/07 21:56:30 (1 year ago)
- Files:
-
- apps/merki/trunk/spec/models/page_spec.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
apps/merki/trunk/spec/models/page_spec.rb
r940 r941 37 37 before(:each) do 38 38 @page = Page.new 39 # Page.base_url = "http://merbivore.com/wiki/" 39 40 end 40 41 … … 84 85 end 85 86 87 it "should convert [[page links]] to URLs when the Page exists" do 88 pending "Needs implementation" 89 Page.stub!(:find_by_title).and_return(true) 90 @page.body = "[[Some Page]]" 91 @page.to_html.should match(%r{<a href="/pages/Some+Page">Some Page</a>}) 92 end 93 94 it "should convert [[page links]] to URLs when the Page exists" do 95 pending "Needs implementation" 96 Page.stub!(:find_by_title).and_return(false) 97 @page.body = "[[Some Page]]" 98 @page.to_html.should match(%r{<a href="/pages/Some+Page">Some Page\?</a>}) 99 end 100 86 101 it "should be valid with all attributes" do 87 102 @page.attributes = valid_page_attributes … … 104 119 Page.find_by_slug("Sample+Page").should == page 105 120 end 121 122 it "should find Pages by slug case-insensitively" 106 123 end
