Class: WikiServiceTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
app/models/wiki_service_test.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



5
6
7
8
9
# File 'app/models/wiki_service_test.rb', line 5

def setup
  WikiService.restart
  @s = WikiService.instance
  @s.create_web "Instiki", "instiki"
end

#test_read_write_pageObject



11
12
13
14
# File 'app/models/wiki_service_test.rb', line 11

def test_read_write_page
  @s.write_page "instiki", "FirstPage", "Electric shocks, I love 'em", Time.now, "DavidHeinemeierHansson"
  assert_equal "Electric shocks, I love 'em", @s.read_page("instiki", "FirstPage").content
end