Commit cff1444052b81d7281a6e6a4254d05510e5a7201

Authored by Braulio Bhavamitra
2 parents 088c792e 54127654

Merge branch 'removing-unusefull-code' into noosfero

test/test_helper.rb
... ... @@ -88,14 +88,6 @@ class ActiveSupport::TestCase
88 88 assert( ((enum1 - enum2) == []) && ((enum2 - enum1) == []), "<#{enum1.inspect}> expected to be equivalent to <#{enum2.inspect}>")
89 89 end
90 90  
91   - def assert_includes(array, element)
92   - assert(array.include?(element), "<#{array.inspect}> expected to include <#{element.inspect}>")
93   - end
94   -
95   - def assert_not_includes(array, element)
96   - assert(!array.include?(element), "<#{array.inspect}> expected to NOT include <#{element.inspect}>")
97   - end
98   -
99 91 def assert_mandatory(object, attribute, test_value = 'some random string')
100 92 object.send("#{attribute}=", nil)
101 93 object.valid?
... ... @@ -111,10 +103,6 @@ class ActiveSupport::TestCase
111 103 assert !object.errors[attribute.to_s].present?
112 104 end
113 105  
114   - def assert_subclass(parent, child)
115   - assert_equal parent, child.superclass, "Class #{child} expected to be a subclass of #{parent}"
116   - end
117   -
118 106 # this check only if text has html tag
119 107 def assert_sanitized(text)
120 108 assert !text.index('<'), "Text '#{text}' expected to be sanitized"
... ...
test/unit/tiny_mce_article_test.rb
... ... @@ -11,7 +11,7 @@ class TinyMceArticleTest &lt; ActiveSupport::TestCase
11 11  
12 12 # this test can be removed when we get real tests for TinyMceArticle
13 13 should 'be an article' do
14   - assert_subclass TextArticle, TinyMceArticle
  14 + assert_kind_of TextArticle, TinyMceArticle.new
15 15 end
16 16  
17 17 should 'define description' do
... ...