queso / signal-wiki

The easy to use rails wiki

commit  97e1874d38dc94079b9205b3cba0b341b3085fc5
tree    2acd64707634af291fae9a4b9e198c65760ec840
parent  ef22344ab94f249f9318c5e5bf5d93e436364d38
signal-wiki / spec / helpers / pages_helper_spec.rb
97e1874d » queso 2008-04-16 Adding the patches from ENT... 1 require File.dirname(__FILE__) + '/../spec_helper'
2
3 describe PagesHelper do
4
5 it "has the right amount of greediness on parsing wiki links" do
6 self.stub!(:wiki_link).and_return "MONKEYS"
7 wikified_body("hello[[there]]whats[[up]]").should == "<p>helloMONKEYSwhatsMONKEYS</p>"
8 wikified_body("hello[[there|hai]]whats[[up|doc]]").should == "<p>helloMONKEYSwhatsMONKEYS</p>"
9 end
10
11 it "parses wiki links" do
12 self.should_receive(:wiki_link).with("up", nil).and_return("MONKEYS")
13 self.should_receive(:wiki_link).with("there", "hai").and_return("MONKEYS")
14 wikified_body("hello[[there|hai]]whats[[up]]").should == "<p>helloMONKEYSwhatsMONKEYS</p>"
15 end
16
17 end