summaryrefslogtreecommitdiff
path: root/spec/helpers/tree_helper_spec.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-09-05 16:52:49 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-09-05 16:52:49 -0400
commit52c521ffe84dac5dc72a299ee1ecf4736a10f07f (patch)
treef7bf0b2eb33589dcb7047db86f3e05fd4b0496bd /spec/helpers/tree_helper_spec.rb
parentb78fd0c13088ce2c19d939a26a26e247ca5047ea (diff)
downloadgitlab-ce-52c521ffe84dac5dc72a299ee1ecf4736a10f07f.tar.gz
Use GitHub::Markup to parse markup files
Closes #1382
Diffstat (limited to 'spec/helpers/tree_helper_spec.rb')
-rw-r--r--spec/helpers/tree_helper_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/helpers/tree_helper_spec.rb b/spec/helpers/tree_helper_spec.rb
new file mode 100644
index 00000000000..bb124d8b303
--- /dev/null
+++ b/spec/helpers/tree_helper_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+describe TreeHelper do
+ describe '#markup?' do
+ %w(mdown md markdown textile rdoc org creole mediawiki rst asciidoc pod).each do |type|
+ it "returns true for #{type} files" do
+ markup?("README.#{type}").should be_true
+ end
+ end
+
+ it "returns false when given a non-markup filename" do
+ markup?('README.rb').should_not be_true
+ end
+ end
+end