Sha256: fbf182a7f4f948c436260592abfbd227f423406f5558a909363eac2c8fe16470

Contents?: true

Size: 500 Bytes

Versions: 19

Compression:

Stored size: 500 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)
require File.expand_path('../../fixture_setup', __FILE__)

AutoHtml.add_filter(:foo) do |text|
  nil
end

AutoHtml.add_filter(:bar) do |text|
  "bar"
end

class User < ActiveRecord::Base
  auto_html_for :bio do
    foo
    foo
    bar
  end
end

class FilterTest < Test::Unit::TestCase
  include FixtureSetup

  def test_transform_after_save
    @article = User.new(:bio => 'in progress...')
    assert_equal 'bar', @article.bio_html
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
auto_html-1.6.4 test/functional/filter_test.rb
auto_html-1.6.3 test/functional/filter_test.rb
auto_html-1.5.1.1 test/functional/filter_test.rb
auto_html-1.6.2 test/functional/filter_test.rb
auto_html-1.6.1 test/functional/filter_test.rb
auto_html-1.6.0 test/functional/filter_test.rb
auto_html-1.5.3 test/functional/filter_test.rb
auto_html-1.5.2 test/functional/filter_test.rb
auto_html-1.5.1 test/functional/filter_test.rb
auto_html-1.5.0 test/functional/filter_test.rb
marcosinger-auto_html-1.3.6 test/functional/filter_test.rb
auto_html-1.4.2 test/functional/filter_test.rb
auto_html-1.4.1 test/functional/filter_test.rb
auto_html-1.4.0 test/functional/filter_test.rb
auto_html-1.3.7 test/functional/filter_test.rb
marcosinger-auto_html-1.3.5 test/functional/filter_test.rb
marcosinger-auto_html-1.3.4 test/functional/filter_test.rb
auto_html-1.3.6 test/functional/filter_test.rb
auto_html-1.3.5 test/functional/filter_test.rb