<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>CHANGELOG</filename>
    </added>
    <added>
      <filename>LICENSE</filename>
    </added>
    <added>
      <filename>lib/acts_as_markup/exts/wikitext.rb</filename>
    </added>
    <added>
      <filename>test/acts_as_markdown_test.rb</filename>
    </added>
    <added>
      <filename>test/acts_as_textile_test.rb</filename>
    </added>
    <added>
      <filename>test/acts_as_wikitext_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
-History.txt
-LICENSE.txt
+CHANGELOG
+LICENSE
 Manifest.txt
 README.rdoc
 Rakefile
@@ -8,6 +8,7 @@ lib/acts/as_markup.rb
 lib/acts_as_markup.rb
 lib/acts_as_markup/exts/rdiscount.rb
 lib/acts_as_markup/exts/string.rb
+lib/acts_as_markup/exts/wikitext.rb
 tasks/bones.rake
 tasks/gem.rake
 tasks/git.rake
@@ -17,5 +18,8 @@ tasks/rdoc.rake
 tasks/rubyforge.rake
 tasks/setup.rb
 tasks/test.rake
+test/acts_as_markdown_test.rb
 test/acts_as_markup_test.rb
+test/acts_as_textile_test.rb
+test/acts_as_wikitext_test.rb
 test/test_helper.rb</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -9,13 +9,13 @@ RDoc: http://viget.rubyforge.org/acts_as_markup
 
 == DESCRIPTION:
 
-Allows you to specify columns of an ActiveRecord model that contain Markdown or 
-Textile text. You may then use +to_s+ to get the original markdown or textile 
+Allows you to specify columns of an ActiveRecord model that contain Markdown, 
+Textile, and Wiki text. You may then use +to_s+ to get the original markup 
 text or +to_html+ to get the formated HTML.
 
 Additionally you can have a model that contains a column that has a column with 
 markup text, and another that defines what language to process it as. If the field 
-is listed as &quot;markdown&quot; or &quot;textile&quot; (case insensitive) it will treat it as such, 
+is listed as &quot;markdown&quot; &quot;textile&quot;, or &quot;wikitext&quot; (case insensitive) it will treat it as such, 
 any other value for markup language will have the value pass through as a normal string.
 
 This AR extension can use 3 different types of Markdown processing backends: 
@@ -46,8 +46,19 @@ By default RDiscount will be used.
     end
 
     @post = Post.find(:first)
-    @post.body.to_s     #=&gt; &quot;h2. Markdown Headline&quot;
-    @post.body.to_html  #=&gt; &quot;&lt;h2&gt;Markdown Headline&lt;/h2&gt;&quot;
+    @post.body.to_s     #=&gt; &quot;h2. Textile Headline&quot;
+    @post.body.to_html  #=&gt; &quot;&lt;h2&gt;Textile Headline&lt;/h2&gt;&quot;
+    
+
+==== Using +acts_as_wikitext+:
+
+    class Post &lt; ActiveRecrod
+      acts_as_wikitext :body
+    end
+
+    @post = Post.find(:first)
+    @post.body.to_s     #=&gt; &quot;== Wikitext Headline ==&quot;
+    @post.body.to_html  #=&gt; &quot;&lt;h2&gt;Wikitext Headline&lt;/h2&gt;&quot;
     
 
 ==== Using +acts_as_markup+:
@@ -75,7 +86,9 @@ By default RDiscount will be used.
 
 == REQUIREMENTS:
 
-You will need the RedCloth library for processing the Textile text.
+You will need the RedCloth[http://whytheluckystiff.net/ruby/redcloth/] library 
+for processing the Textile text, and the Wikitext[http://wikitext.rubyforge.org/] 
+library for processing wikitext.
 
 You will also need to install some type of Markdown processor.
 The three options currently supported are:</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -13,13 +13,13 @@ PROJ.name = 'acts_as_markup'
 PROJ.authors = 'Brian Landau'
 PROJ.email = 'brian.landau@viget.com'
 PROJ.url = 'http://viget.rubyforge.com/acts_as_markup'
-PROJ.description = &quot;Represent ActiveRecord Markdown or Textile text columns as Markdown or Textile objects using various external libraries to convert to HTML.&quot;
+PROJ.description = &quot;Represent ActiveRecord Markdown, Textile, or Wiki text columns as Markdown, Textile or Wikitext objects using various external libraries to convert to HTML.&quot;
 PROJ.rubyforge.name = 'viget'
 PROJ.version = ActsAsMarkup::VERSION
-PROJ.rdoc.include = %w(^lib/ LICENSE\.txt README\.rdoc)
+PROJ.rdoc.include = %w(^lib/ LICENSE CHANGELOG README\.rdoc)
 PROJ.rdoc.remote_dir = 'acts_as_markup'
 PROJ.test.files = FileList['test/**/*_test.rb']
 
-%W(activesupport activerecord rdiscount RedCloth).each  do |gem|
+%W(activesupport activerecord rdiscount RedCloth wikitext).each  do |gem|
   depend_on gem
 end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,22 @@
 Gem::Specification.new do |s|
   s.name = %q{acts_as_markup}
-  s.version = &quot;0.2.0&quot;
+  s.version = &quot;0.3.0&quot;
 
   s.required_rubygems_version = Gem::Requirement.new(&quot;&gt;= 0&quot;) if s.respond_to? :required_rubygems_version=
   s.authors = [&quot;Brian Landau&quot;]
-  s.date = %q{2008-08-07}
-  s.description = %q{Represent ActiveRecord Markdown or Textile text columns as Markdown or Textile objects using various external libraries to convert to HTML.}
+  s.date = %q{2008-08-08}
+  s.description = %q{Represent ActiveRecord Markdown, Textile, or Wiki text columns as Markdown, Textile or Wikitext objects using various external libraries to convert to HTML.}
   s.email = %q{brian.landau@viget.com}
-  s.extra_rdoc_files = [&quot;LICENSE.txt&quot;, &quot;README.rdoc&quot;]
-  s.files = [&quot;History.txt&quot;, &quot;LICENSE.txt&quot;, &quot;Manifest.txt&quot;, &quot;README.rdoc&quot;, &quot;Rakefile&quot;, &quot;acts_as_markup.gemspec&quot;, &quot;lib/acts/as_markup.rb&quot;, &quot;lib/acts_as_markup.rb&quot;, &quot;lib/acts_as_markup/exts/rdiscount.rb&quot;, &quot;lib/acts_as_markup/exts/string.rb&quot;, &quot;tasks/bones.rake&quot;, &quot;tasks/gem.rake&quot;, &quot;tasks/git.rake&quot;, &quot;tasks/manifest.rake&quot;, &quot;tasks/post_load.rake&quot;, &quot;tasks/rdoc.rake&quot;, &quot;tasks/rubyforge.rake&quot;, &quot;tasks/setup.rb&quot;, &quot;tasks/test.rake&quot;, &quot;test/acts_as_markup_test.rb&quot;, &quot;test/test_helper.rb&quot;]
+  s.extra_rdoc_files = [&quot;CHANGELOG&quot;, &quot;LICENSE&quot;, &quot;README.rdoc&quot;]
+  s.files = [&quot;CHANGELOG&quot;, &quot;LICENSE&quot;, &quot;Manifest.txt&quot;, &quot;README.rdoc&quot;, &quot;Rakefile&quot;, &quot;acts_as_markup.gemspec&quot;, &quot;lib/acts/as_markup.rb&quot;, &quot;lib/acts_as_markup.rb&quot;, &quot;lib/acts_as_markup/exts/rdiscount.rb&quot;, &quot;lib/acts_as_markup/exts/string.rb&quot;, &quot;lib/acts_as_markup/exts/wikitext.rb&quot;, &quot;tasks/bones.rake&quot;, &quot;tasks/gem.rake&quot;, &quot;tasks/git.rake&quot;, &quot;tasks/manifest.rake&quot;, &quot;tasks/post_load.rake&quot;, &quot;tasks/rdoc.rake&quot;, &quot;tasks/rubyforge.rake&quot;, &quot;tasks/setup.rb&quot;, &quot;tasks/test.rake&quot;, &quot;test/acts_as_markdown_test.rb&quot;, &quot;test/acts_as_markup_test.rb&quot;, &quot;test/acts_as_textile_test.rb&quot;, &quot;test/acts_as_wikitext_test.rb&quot;, &quot;test/test_helper.rb&quot;]
   s.has_rdoc = true
   s.homepage = %q{http://viget.rubyforge.com/acts_as_markup}
   s.rdoc_options = [&quot;--main&quot;, &quot;README.rdoc&quot;]
   s.require_paths = [&quot;lib&quot;]
   s.rubyforge_project = %q{viget}
   s.rubygems_version = %q{1.2.0}
-  s.summary = %q{Represent ActiveRecord Markdown or Textile text columns as Markdown or Textile objects using various external libraries to convert to HTML}
-  s.test_files = [&quot;test/acts_as_markup_test.rb&quot;]
+  s.summary = %q{Represent ActiveRecord Markdown, Textile, or Wiki text columns as Markdown, Textile or Wikitext objects using various external libraries to convert to HTML}
+  s.test_files = [&quot;test/acts_as_markdown_test.rb&quot;, &quot;test/acts_as_markup_test.rb&quot;, &quot;test/acts_as_textile_test.rb&quot;, &quot;test/acts_as_wikitext_test.rb&quot;]
 
   if s.respond_to? :specification_version then
     current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -27,16 +27,19 @@ Gem::Specification.new do |s|
       s.add_runtime_dependency(%q&lt;activerecord&gt;, [&quot;&gt;= 2.1.0&quot;])
       s.add_runtime_dependency(%q&lt;rdiscount&gt;, [&quot;&gt;= 1.2.7&quot;])
       s.add_runtime_dependency(%q&lt;RedCloth&gt;, [&quot;&gt;= 4.0.1&quot;])
+      s.add_runtime_dependency(%q&lt;wikitext&gt;, [&quot;&gt;= 1.1.1&quot;])
     else
       s.add_dependency(%q&lt;activesupport&gt;, [&quot;&gt;= 2.1.0&quot;])
       s.add_dependency(%q&lt;activerecord&gt;, [&quot;&gt;= 2.1.0&quot;])
       s.add_dependency(%q&lt;rdiscount&gt;, [&quot;&gt;= 1.2.7&quot;])
       s.add_dependency(%q&lt;RedCloth&gt;, [&quot;&gt;= 4.0.1&quot;])
+      s.add_dependency(%q&lt;wikitext&gt;, [&quot;&gt;= 1.1.1&quot;])
     end
   else
     s.add_dependency(%q&lt;activesupport&gt;, [&quot;&gt;= 2.1.0&quot;])
     s.add_dependency(%q&lt;activerecord&gt;, [&quot;&gt;= 2.1.0&quot;])
     s.add_dependency(%q&lt;rdiscount&gt;, [&quot;&gt;= 1.2.7&quot;])
     s.add_dependency(%q&lt;RedCloth&gt;, [&quot;&gt;= 4.0.1&quot;])
+    s.add_dependency(%q&lt;wikitext&gt;, [&quot;&gt;= 1.1.1&quot;])
   end
 end</diff>
      <filename>acts_as_markup.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -11,15 +11,15 @@ module ActiveRecord # :nodoc:
         
         ##
         # This allows you to specify columns you want to define as containing 
-        # Markdown or Textile content.
+        # Markdown, Textile or Wikitext content.
         # Then you can simply call &lt;tt&gt;.to_html&lt;/tt&gt; method on the attribute.
         # 
         # You can also specify the language as &lt;tt&gt;:variable&lt;/tt&gt; you will then
         # need to add an additional option of &lt;tt&gt;:language_column&lt;/tt&gt;. When 
-        # a value is accessed it will create the correct object (Markdown or Textile)
-        # based on the value of the language column. If any value besides markdown or
-        # textile is supplied for the markup language the text will pass through
-        # as a string.
+        # a value is accessed it will create the correct object (Markdown, Textile, 
+        # or Wikitext) based on the value of the language column. If any value 
+        # besides markdown, textile, or wikitext is supplied for the markup language 
+        # the text will pass through as a string.
         # 
         # 
         # ==== Examples
@@ -50,26 +50,21 @@ module ActiveRecord # :nodoc:
         def acts_as_markup(options)
           case options[:language].to_sym
           when :markdown
-            if ActsAsMarkup::MARKDOWN_LIBS.keys.include? ActsAsMarkup.markdown_library
-              markdown_library_names = ActsAsMarkup::MARKDOWN_LIBS[ActsAsMarkup.markdown_library]
-              require markdown_library_names[:lib_name]
-              klass = markdown_library_names[:class_name]
-            else
-              raise ActsAsMarkup::UnsportedMarkdownLibrary, &quot;#{ActsAsMarkup.markdown_library} is not currently supported.&quot;
-            end
+            klass = get_markdown_class
           when :textile
             require 'redcloth'
             klass = 'RedCloth'
+          when :wikitext
+            require 'wikitext'
+            require_extensions 'wikitext'
+            klass = 'WikitextString'
           when :variable
-            if ActsAsMarkup::MARKDOWN_LIBS.keys.include? ActsAsMarkup.markdown_library
-              markdown_library_names = ActsAsMarkup::MARKDOWN_LIBS[ActsAsMarkup.markdown_library]
-              require markdown_library_names[:lib_name]
-              markdown_klass = markdown_library_names[:class_name]
-            else
-              raise ActsAsMarkup::UnsportedMarkdownLibrary, &quot;#{ActsAsMarkup.markdown_library} is not currently supported.&quot;
-            end
+            markdown_klass = get_markdown_class
             require 'redcloth'
+            require 'wikitext'
+            require_extensions 'wikitext'
             textile_klass = 'RedCloth'
+            wiki_klass = 'WikitextString'
           else
             raise ActsAsMarkup::UnsportedMarkupLanguage, &quot;#{options[:langauge]} is not a currently supported markup language.&quot;
           end
@@ -99,6 +94,8 @@ module ActiveRecord # :nodoc:
                     @#{col.to_s} = #{markdown_klass}.new(self['#{col.to_s}'].to_s)
                   when /textile/i
                     @#{col.to_s} = #{textile_klass}.new(self['#{col.to_s}'].to_s)
+                  when /wikitext/i
+                    @#{col.to_s} = #{wiki_klass}.new(self['#{col.to_s}'].to_s)
                   else
                     @#{col.to_s} = self['#{col.to_s}']
                   end
@@ -124,6 +121,32 @@ module ActiveRecord # :nodoc:
           acts_as_markup :language =&gt; :textile, :columns =&gt; columns
         end
         
+        ##
+        # This is a convenience method for 
+        # `&lt;tt&gt;acts_as_markup :language =&gt; :wikitext, :columns =&gt; [:body]&lt;/tt&gt;`
+        #
+        def acts_as_wikitext(*columns)
+          acts_as_markup :language =&gt; :wikitext, :columns =&gt; columns
+        end
+        
+        
+        private
+          def get_markdown_class
+            if ActsAsMarkup::MARKDOWN_LIBS.keys.include? ActsAsMarkup.markdown_library
+              markdown_library_names = ActsAsMarkup::MARKDOWN_LIBS[ActsAsMarkup.markdown_library]
+              require markdown_library_names[:lib_name]
+              require_extensions(markdown_library_names[:lib_name])
+              return markdown_library_names[:class_name]
+            else
+              raise ActsAsMarkup::UnsportedMarkdownLibrary, &quot;#{ActsAsMarkup.markdown_library} is not currently supported.&quot;
+            end
+          end
+          def require_extensions(library)# :nodoc:
+            if %w(rdiscount maruku wikitext).include? library.to_s
+              require &quot;acts_as_markup/exts/#{library.to_s}&quot;
+            end
+          end
+        
       end
     end
   end</diff>
      <filename>lib/acts/as_markup.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require 'active_support'
 
 module ActsAsMarkup
   # :stopdoc:
-  VERSION = '0.2.0'
+  VERSION = '0.3.0'
   LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
   PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
   # :startdoc:
@@ -66,5 +66,5 @@ module ActsAsMarkup
 
 end  # module ActsAsMarkup
 
-ActsAsMarkup.require_all_libs_relative_to __FILE__
+require 'acts_as_markup/exts/string'
 ActsAsMarkup.require_all_libs_relative_to __FILE__, 'acts'</diff>
      <filename>lib/acts_as_markup.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+require 'rdiscount'
+
 class RDiscount
   def to_s
     self.text</diff>
      <filename>lib/acts_as_markup/exts/rdiscount.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1 @@
-module ActsAsMarkup
-  module StringExtension
-    def to_html
-      self.to_s
-    end
-  end
-end
-
-String.send :include, ActsAsMarkup::StringExtension
+String.send :alias_method, :to_html, :to_s</diff>
      <filename>lib/acts_as_markup/exts/string.rb</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@ PROJ = OpenStruct.new(
   # System Defaults
   :ruby_opts =&gt; %w(-w),
   :libs =&gt; [],
-  :history_file =&gt; 'History.txt',
+  :history_file =&gt; 'CHANGELOG',
   :manifest_file =&gt; 'Manifest.txt',
   :readme_file =&gt; 'README.rdoc',
 </diff>
      <filename>tasks/setup.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,224 +1,10 @@
 require File.dirname(__FILE__) + '/test_helper'
 
-class ActsAsMarkupTest &lt; Test::Unit::TestCase
+class ActsAsMarkupTest &lt; ActsAsMarkupTestCase
   def setup
     setup_db
   end
   
-  context 'acts_as_markdown' do
-    setup do
-      @markdown_text = '## Markdown Test Text'
-    end
-    
-    context 'using RDiscount' do
-      setup do
-        ActsAsMarkup.markdown_library = :rdiscount
-        class ::Post &lt; ActiveRecord::Base
-          acts_as_markdown :body
-        end
-        @post = Post.create!(:title =&gt; 'Blah', :body =&gt; @markdown_text)
-      end
-    
-      should &quot;have a RDiscount object returned for the column value&quot; do
-        assert_kind_of RDiscount, @post.body
-      end
-    
-      should &quot;return original markdown text for a `to_s` method call on the column value&quot; do
-        assert_equal @markdown_text, @post.body.to_s
-      end
-    
-      should &quot;return formated html for a `to_html` method call on the column value&quot; do
-        assert_match(/&lt;h2&gt;\s*Markdown Test Text\s*&lt;\/h2&gt;/, @post.body.to_html)
-      end
-    
-      context &quot;changing value of markdown field should return new markdown object&quot; do
-        setup do
-          @old_body = @post.body
-          @post.body = &quot;`@count = 20`&quot;
-        end
-      
-        should &quot;still have an RDiscount object but not the same object&quot; do
-          assert_kind_of RDiscount, @post.body
-          assert_not_same @post.body, @old_body 
-        end
-      
-        should &quot;return correct text for `to_s`&quot; do
-          assert_equal &quot;`@count = 20`&quot;, @post.body.to_s
-        end
-      
-        should &quot;return correct HTML for the `to_html` method&quot; do
-          assert_match(/&lt;code&gt;\s*\@count\s\=\s20\s*&lt;\/code&gt;/, @post.body.to_html)
-        end
-      
-        teardown do
-          @old_body = nil
-        end
-      end
-    
-      teardown do
-        @post = nil
-        Post.delete_all
-      end
-    end
-  
-    context 'using Ruby PEG Markdown' do
-      setup do
-        ActsAsMarkup.markdown_library = :rpeg
-        class ::Post &lt; ActiveRecord::Base
-          acts_as_markdown :body
-        end
-        @post = Post.create!(:title =&gt; 'Blah', :body =&gt; @markdown_text)
-      end
-    
-      should &quot;have a Ruby PEG Markdown object returned for the column value&quot; do
-        assert_kind_of PEGMarkdown, @post.body
-      end
-    
-      should &quot;return original markdown text for a `to_s` method call on the column value&quot; do
-        assert_equal @markdown_text, @post.body.to_s
-      end
-    
-      should &quot;return formated html for a `to_html` method call on the column value&quot; do
-        assert_match(/&lt;h2&gt;\s*Markdown Test Text\s*&lt;\/h2&gt;/, @post.body.to_html)
-      end
-    
-      context &quot;changing value of markdown field should return new markdown object&quot; do
-        setup do
-          @old_body = @post.body
-          @post.body = &quot;`@count = 20`&quot;
-        end
-      
-        should &quot;still have an PEGMarkdown object but not the same object&quot; do
-          assert_kind_of PEGMarkdown, @post.body
-          assert_not_same @post.body, @old_body 
-        end
-      
-        should &quot;return correct text for `to_s`&quot; do
-          assert_equal &quot;`@count = 20`&quot;, @post.body.to_s
-        end
-      
-        should &quot;return correct HTML for the `to_html` method&quot; do
-          assert_match(/&lt;code&gt;\s*\@count\s\=\s20\s*&lt;\/code&gt;/, @post.body.to_html)
-        end
-      
-        teardown do
-          @old_body = nil
-        end
-      end
-    
-      teardown do
-        @post = nil
-        Post.delete_all
-      end
-    end
-  
-    context 'using BlueCloth' do
-      setup do
-        ActsAsMarkup.markdown_library = :bluecloth
-        class ::Post &lt; ActiveRecord::Base
-          acts_as_markdown :body
-        end
-        @post = Post.create!(:title =&gt; 'Blah', :body =&gt; @markdown_text)
-      end
-    
-      should &quot;have a BlueCloth object returned for the column value&quot; do
-        assert_kind_of BlueCloth, @post.body
-      end
-    
-      should &quot;return original markdown text for a `to_s` method call on the column value&quot; do
-        assert_equal @markdown_text, @post.body.to_s
-      end
-    
-      should &quot;return formated html for a `to_html` method call on the column value&quot; do
-        assert_match(/&lt;h2&gt;\s*Markdown Test Text\s*&lt;\/h2&gt;/, @post.body.to_html)
-      end
-    
-      context &quot;changing value of markdown field should return new markdown object&quot; do
-        setup do
-          @old_body = @post.body
-          @post.body = &quot;`@count = 20`&quot;
-        end
-      
-        should &quot;still have an BlueCloth object but not the same object&quot; do
-          assert_kind_of BlueCloth, @post.body
-          assert_not_same @post.body, @old_body 
-        end
-      
-        should &quot;return correct text for `to_s`&quot; do
-          assert_equal &quot;`@count = 20`&quot;, @post.body.to_s
-        end
-      
-        should &quot;return correct HTML for the `to_html` method&quot; do
-          assert_match(/&lt;code&gt;\s*\@count\s\=\s20\s*&lt;\/code&gt;/, @post.body.to_html)
-        end
-      
-        teardown do
-          @old_body = nil
-        end
-      end
-    
-      teardown do
-        @post = nil
-        Post.delete_all
-      end
-    end
-    
-    teardown do
-      @markdown_text = nil
-    end
-  end
-  
-  context 'acts_as_textile' do
-    setup do
-      @textile_text = &quot;h2. Textile Test Text&quot;
-      class ::Post &lt; ActiveRecord::Base
-        acts_as_textile :body
-      end
-      @post = Post.create!(:title =&gt; 'Blah', :body =&gt; @textile_text)
-    end
-    
-    should &quot;have a RedCloth object returned for the column value&quot; do
-      assert_kind_of RedCloth::TextileDoc, @post.body
-    end
-  
-    should &quot;return original textile text for a `to_s` method call on the column value&quot; do
-      assert_equal @textile_text, @post.body.to_s
-    end
-  
-    should &quot;return formated html for a `to_html` method call on the column value&quot; do
-      assert_match(/&lt;h2&gt;Textile Test Text&lt;\/h2&gt;/, @post.body.to_html)
-    end
-  
-    context &quot;changing value of textile field should return new textile object&quot; do
-      setup do
-        @old_body = @post.body
-        @post.body = &quot;@@count = 20@&quot;
-      end
-    
-      should &quot;still have an RedCloth object but not the same object&quot; do
-        assert_kind_of RedCloth::TextileDoc, @post.body
-        assert_not_same @post.body, @old_body 
-      end
-    
-      should &quot;return correct text for `to_s`&quot; do
-        assert_equal &quot;@@count = 20@&quot;, @post.body.to_s
-      end
-    
-      should &quot;return correct HTML for the `to_html` method&quot; do
-        assert_match(/&lt;code&gt;\@count\s\=\s20&lt;\/code&gt;/, @post.body.to_html)
-      end
-    
-      teardown do
-        @old_body = nil
-      end
-    end
-    
-    teardown do
-      @textile_text, @post = nil
-      Post.delete_all
-    end
-  end
-  
   context 'acts_as_markup' do
     setup do
       ActsAsMarkup.markdown_library = ActsAsMarkup::DEFAULT_MAKRDOWN_LIB
@@ -390,6 +176,54 @@ class ActsAsMarkupTest &lt; Test::Unit::TestCase
       end
     end
     
+    context 'with a Wikitext post' do
+      setup do
+        @wikitext = &quot;== Wikitext Test Text ==&quot;
+        @wikitext_post = VariablePost.create!(:title =&gt; 'Blah', :body =&gt; @wikitext, :markup_language =&gt; 'Wikitext')
+      end
+
+      should &quot;have a WikitextString object returned for the column value&quot; do
+        assert_kind_of WikitextString, @wikitext_post.body
+      end
+
+      should &quot;return original wikitext text for a `to_s` method call on the column value&quot; do
+        assert_equal @wikitext, @wikitext_post.body.to_s
+      end
+
+      should &quot;return formated html for a `to_html` method call on the column value&quot; do
+        assert_match(/&lt;h2&gt;Wikitext Test Text&lt;\/h2&gt;/, @wikitext_post.body.to_html)
+      end
+
+      context &quot;changing value of wikitext field should return new wikitext object&quot; do
+        setup do
+          @old_body = @wikitext_post.body
+          @wikitext_post.body = &quot;`@count = 20`&quot;
+        end
+
+        should &quot;still have an WikitextString object but not the same object&quot; do
+          assert_kind_of WikitextString, @wikitext_post.body
+          assert_not_same @wikitext_post.body, @old_body 
+        end
+
+        should &quot;return correct text for `to_s`&quot; do
+          assert_equal &quot;`@count = 20`&quot;, @wikitext_post.body.to_s
+        end
+
+        should &quot;return correct HTML for the `to_html` method&quot; do
+          assert_match(/&lt;tt&gt;\@count\s\=\s20&lt;\/tt&gt;/, @wikitext_post.body.to_html)
+        end
+
+        teardown do
+          @old_body = nil
+        end
+      end
+
+      teardown do
+        @wikitext, @wikitext_post = nil
+        Post.delete_all
+      end
+    end
+    
     context &quot;with a plain text post&quot; do
       setup do
         @plain_text = &quot;Hahaha!!!&quot;
@@ -403,8 +237,10 @@ class ActsAsMarkupTest &lt; Test::Unit::TestCase
       should &quot;return the original string with a `to_s` method call on the column value&quot; do
         assert_equal @plain_text, @plain_text_post.body.to_s
       end
-
-      should &quot;eturn the original string with a `to_html` method call on the column value&quot; do
+      
+      # FIXME: why is this failing??? both objects are String, both have EXACTLY the same value when output
+      #        in failure message. assert_equal does not require same object. This is very odd!
+      should &quot;return the original string with a `to_html` method call on the column value&quot; do
         assert_equal @plain_text, @plain_text_post.body.to_html
       end
 
@@ -470,6 +306,32 @@ class ActsAsMarkupTest &lt; Test::Unit::TestCase
       end
     end
     
+    context 'with wikitext' do
+      setup do
+        class ::Post &lt; ActiveRecord::Base
+          acts_as_wikitext :body
+        end
+        @post = Post.create!(:title =&gt; 'Blah', :body =&gt; @text)
+      end
+      
+      should 'return a blank string for `to_s` method' do
+        assert_equal @post.body.to_s, ''
+      end
+      
+      should 'return a blank string for `to_html` method' do
+        assert_match(/[\n\s]*/, @post.body.to_html)
+      end
+      
+      should &quot;have a RedCloth object returned for the column value&quot; do
+        assert_kind_of WikitextString, @post.body
+      end
+      
+      teardown do
+        @post = nil
+        Post.delete_all
+      end
+    end
+    
     context 'with RDiscount Markdown' do
       setup do
         ActsAsMarkup.markdown_library = :rdiscount
@@ -556,7 +418,7 @@ class ActsAsMarkupTest &lt; Test::Unit::TestCase
     should 'raise exception when a non-supported language is passed to acts_as_markup' do
       assert_raise ActsAsMarkup::UnsportedMarkupLanguage do
         class ::Post &lt; ActiveRecord::Base
-          acts_as_markup :language =&gt; :wiki, :columns =&gt; [:body]
+          acts_as_markup :language =&gt; :fake, :columns =&gt; [:body]
         end
       end
     end</diff>
      <filename>test/acts_as_markup_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,7 @@
 require 'test/unit'
 require 'shoulda'
+require 'active_support'
+require 'active_support/test_case'
 require File.expand_path( File.join(File.dirname(__FILE__), %w[.. lib acts_as_markup]) )
 
 ActiveRecord::Base.establish_connection(:adapter =&gt; &quot;sqlite3&quot;, :dbfile =&gt; &quot;:memory:&quot;)
@@ -38,3 +40,13 @@ def teardown_db
     ActiveRecord::Base.connection.drop_table(table)
   end
 end
+
+class ActsAsMarkupTestCase &lt; ActiveSupport::TestCase
+  def setup
+    setup_db
+  end
+  
+  def teardown
+    teardown_db
+  end
+end</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>History.txt</filename>
    </removed>
    <removed>
      <filename>LICENSE.txt</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>1fe308cc22b0456b0fbe846cf4a829baef389cbb</id>
    </parent>
  </parents>
  <author>
    <name>Brian Landau</name>
    <email>brianjlandau@gmail.com</email>
  </author>
  <url>http://github.com/vigetlabs/acts_as_markup/commit/c20eefadc0ea569a1a44d9179fdf1c63adaadb99</url>
  <id>c20eefadc0ea569a1a44d9179fdf1c63adaadb99</id>
  <committed-date>2008-08-08T19:50:48-07:00</committed-date>
  <authored-date>2008-08-08T19:50:48-07:00</authored-date>
  <message>Revamp some areas of the code and documentation. Add Wikitext support. Split tests into multiple files so it's easier to follow. Rename some files.</message>
  <tree>7f3c325524a677b8b64e5291c854b5a1ff6a64f1</tree>
  <committer>
    <name>Brian Landau</name>
    <email>brianjlandau@gmail.com</email>
  </committer>
</commit>
