queso / signal-wiki
- Source
- Commits
- Network (12)
- Issues (2)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
97e1874
commit 97e1874d38dc94079b9205b3cba0b341b3085fc5
tree 2acd64707634af291fae9a4b9e198c65760ec840
parent ef22344ab94f249f9318c5e5bf5d93e436364d38
tree 2acd64707634af291fae9a4b9e198c65760ec840
parent ef22344ab94f249f9318c5e5bf5d93e436364d38
| 97e1874d » | queso | 2008-04-16 | 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 | ||||
