Commit cff1444052b81d7281a6e6a4254d05510e5a7201
Exists in
master
and in
29 other branches
Merge branch 'removing-unusefull-code' into noosfero
Showing
2 changed files
with
1 additions
and
13 deletions
Show diff stats
test/test_helper.rb
@@ -88,14 +88,6 @@ class ActiveSupport::TestCase | @@ -88,14 +88,6 @@ class ActiveSupport::TestCase | ||
88 | assert( ((enum1 - enum2) == []) && ((enum2 - enum1) == []), "<#{enum1.inspect}> expected to be equivalent to <#{enum2.inspect}>") | 88 | assert( ((enum1 - enum2) == []) && ((enum2 - enum1) == []), "<#{enum1.inspect}> expected to be equivalent to <#{enum2.inspect}>") |
89 | end | 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 | def assert_mandatory(object, attribute, test_value = 'some random string') | 91 | def assert_mandatory(object, attribute, test_value = 'some random string') |
100 | object.send("#{attribute}=", nil) | 92 | object.send("#{attribute}=", nil) |
101 | object.valid? | 93 | object.valid? |
@@ -111,10 +103,6 @@ class ActiveSupport::TestCase | @@ -111,10 +103,6 @@ class ActiveSupport::TestCase | ||
111 | assert !object.errors[attribute.to_s].present? | 103 | assert !object.errors[attribute.to_s].present? |
112 | end | 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 | # this check only if text has html tag | 106 | # this check only if text has html tag |
119 | def assert_sanitized(text) | 107 | def assert_sanitized(text) |
120 | assert !text.index('<'), "Text '#{text}' expected to be sanitized" | 108 | assert !text.index('<'), "Text '#{text}' expected to be sanitized" |
test/unit/tiny_mce_article_test.rb
@@ -11,7 +11,7 @@ class TinyMceArticleTest < ActiveSupport::TestCase | @@ -11,7 +11,7 @@ class TinyMceArticleTest < ActiveSupport::TestCase | ||
11 | 11 | ||
12 | # this test can be removed when we get real tests for TinyMceArticle | 12 | # this test can be removed when we get real tests for TinyMceArticle |
13 | should 'be an article' do | 13 | should 'be an article' do |
14 | - assert_subclass TextArticle, TinyMceArticle | 14 | + assert_kind_of TextArticle, TinyMceArticle.new |
15 | end | 15 | end |
16 | 16 | ||
17 | should 'define description' do | 17 | should 'define description' do |