Permalink
Browse files

Add coverage of String and Enumerator

  • Loading branch information...
1 parent 3f6d838 commit 8c1b8d33970c0d29347fc36c64fd3c881ea67767 @noprompt noprompt committed Dec 13, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/seq_spec.rb
View
@@ -208,6 +208,18 @@ def to_a; [:q]; end
it { should be_an_instance_of Rouge::Seq::Array }
it { should eq Rouge::Seq::Array.new([[:a, "a"], [:b, "b"]], 0) }
end
+
+ context String do
+ subject { Rouge::Seq.seq("foo") }
+ it { should be_an_instance_of Rouge::Seq::Array }
+ it { should eq Rouge::Seq::Array.new(['f', 'o', 'o'], 0) }
+ end
+
+ context Enumerator do
+ subject { Rouge::Seq.seq(1.upto(3)) }
+ it { should be_an_instance_of Rouge::Seq::Array }
+ it { should eq Rouge::Seq::Array.new([1, 2, 3], 0) }
+ end
end
end

0 comments on commit 8c1b8d3

Please sign in to comment.