Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added specs for RawNode and CommentNode.

  • Loading branch information...
commit 2b5ca6e4747111ba4f1bdcca1645445d836e2a07 1 parent 0543432
Sam Rose authored May 01, 2012
22  spec/comment_node_spec.rb
... ...
@@ -0,0 +1,22 @@
  1
+require 'spec_helper'
  2
+
  3
+describe VimColorScheme::CommentNode do
  4
+  let :single_line_comment do
  5
+    comment = VimColorScheme::CommentNode.new "This is a comment!"
  6
+    comment.to_s
  7
+  end
  8
+
  9
+  let :multi_line_comment do
  10
+    comment = VimColorScheme::CommentNode.new "This is.\nA multiline.\nComment."
  11
+    comment.to_s
  12
+  end
  13
+
  14
+  it 'should put the comment character on the front of a comment' do
  15
+    single_line_comment.should == '" This is a comment!' + "\n"
  16
+  end
  17
+
  18
+  it 'should render multiline comments properly' do
  19
+    multi_line_comment.should == '" This is.' + "\n" + '" A multiline.' +
  20
+      "\n" + '" Comment.' + "\n"
  21
+  end
  22
+end
12  spec/raw_node_spec.rb
... ...
@@ -0,0 +1,12 @@
  1
+require 'spec_helper'
  2
+
  3
+describe VimColorScheme::RawNode do
  4
+  let :raw_node do
  5
+    raw = VimColorScheme::RawNode.new "Raw content."
  6
+    raw.to_s
  7
+  end
  8
+
  9
+  it 'should render content verbatim' do
  10
+    raw_node.should == "Raw content.\n"
  11
+  end
  12
+end

0 notes on commit 2b5ca6e

Please sign in to comment.
Something went wrong with that request. Please try again.