Class: WikiTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
ChunkMatch
Defined in:
app/models/chunks/wiki_test.rb

Instance Method Summary collapse

Methods included from ChunkMatch

#match

Instance Method Details

#test_complex_bracketsObject



24
25
26
27
28
# File 'app/models/chunks/wiki_test.rb', line 24

def test_complex_brackets
	match(WikiChunk::Link, 'This is a tricky link [[Sperberg-McQueen]]',
:page_name => 'Sperberg-McQueen', :escaped_text => nil
	)
end

#test_escapedObject



12
13
14
15
16
# File 'app/models/chunks/wiki_test.rb', line 12

def test_escaped
	match(WikiChunk::Word, 'Do not link to an \EscapedWord',
:page_name => 'EscapedWord', :escaped_text => 'EscapedWord'
	)
end

#test_simpleObject



8
9
10
# File 'app/models/chunks/wiki_test.rb', line 8

def test_simple
	match(WikiChunk::Word, 'This is a WikiWord okay?', :page_name => 'WikiWord')
end

#test_simple_bracketsObject



18
19
20
21
22
# File 'app/models/chunks/wiki_test.rb', line 18

def test_simple_brackets
	match(WikiChunk::Link, 'This is a [[bracketted link]]',
:page_name => 'bracketted link', :escaped_text => nil
	)
end