File: link.rb

package info (click to toggle)
ruby-innate 2013.02.21-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 848 kB
  • ctags: 622
  • sloc: ruby: 4,340; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 740 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require File.expand_path('../../helper', __FILE__)
require File.expand_path('../../../example/link', __FILE__)

describe 'example/link' do
  behaves_like :rack_test

  should 'have index on Linking' do
    get('/').body.should == 'Index links to <a href="/help">Help?</a>'
  end

  should 'have help on Linking' do
    get('/help').body.should ==
      "Help links to <a href=\"/link_to/another\">A Different Node</a>"
  end

  should 'have another on Different' do
    get('/link_to/another').body.
      should == "<a href=\"/link_to/and/deeper\">Another links even deeper</a>"
  end

  should 'have and__deeper on Different' do
    get('/link_to/and/deeper').body.
      should == "<a href=\"/index\">Back to Linking Node</a>"
  end
end