File: textile_output_buffer_spec.rb

package info (click to toggle)
ruby-org 0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,476 kB
  • ctags: 213
  • sloc: ruby: 2,748; lisp: 50; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 761 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe Orgmode::TextileOutputBuffer do
  it "should substitute / with _" do
    Orgmode::TextileOutputBuffer.new("").inline_formatting("/italic/").should eql("_italic_")
  end

  it "should convert simple links" do
    Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com]]").should \
      eql("\"http://www.google.com\":http://www.google.com")
  end

  it "should convert links with text" do
    Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com][Google]]").should \
      eql("\"Google\":http://www.google.com")
  end

  it "should convert spaces in urls" do
    Orgmode::TextileOutputBuffer.new("").inline_formatting("[[my url]]").should eql("\"my url\":my%20url")
  end
end