Permalink
Browse files

update text filters to be test only

  • Loading branch information...
1 parent aa814da commit 5128ee8214a98db7877de3d16e1759463567d431 @saturnflyer saturnflyer committed Mar 4, 2012
Showing with 11 additions and 14 deletions.
  1. +9 −12 spec/datasets/markup_pages_dataset.rb
  2. +2 −2 spec/models/text_filter_spec.rb
@@ -1,15 +1,12 @@
-unless defined?(TextileFilter)
- class TextileFilter < TextFilter
- def filter(text)
- text + ' - Filtered with TEXTILE!'
- end
+class PseudoTextileFilter < TextFilter
+ def filter(text)
+ text + ' - Filtered with TEXTILE!'
end
end
-unless defined?(MarkdownFilter)
- class MarkdownFilter < TextFilter
- def filter(text)
- text + ' - Filtered with MARKDOWN!'
- end
+
+class PseudoMarkdownFilter < TextFilter
+ def filter(text)
+ text + ' - Filtered with MARKDOWN!'
end
end
@@ -18,10 +15,10 @@ class MarkupPagesDataset < Dataset::Base
def load
create_page "Textile" do
- create_page_part :textile_body, :name => "body", :filter_id => "Textile", :content => "Some *Textile* content."
+ create_page_part :textile_body, :name => "body", :filter_id => "Pseudo Textile", :content => "Some *Textile* content."
end
create_page "Markdown" do
- create_page_part :markdown_body, :name => "body", :filter_id => "Markdown", :content => "Some **Markdown** content."
+ create_page_part :markdown_body, :name => "body", :filter_id => "Pseudo Markdown", :content => "Some **Markdown** content."
end
end
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require 'spec_helper'
describe TextFilter do
class ReverseFilter < TextFilter
@@ -22,7 +22,7 @@ class CustomFilter < TextFilter
end
it 'should return an array of filter_names of all available filters' do
- TextFilter.descendants_names.should include("Markdown", "Really Custom", "Reverse", "SmartyPants", "Textile")
+ TextFilter.descendants_names.should include("Markdown", "Really Custom", "Reverse", "Textile")
end
it 'should filter text with base filter' do

0 comments on commit 5128ee8

Please sign in to comment.