rim 2.18.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,38 +0,0 @@
1
- # encoding: utf-8
2
- require 'rim'
3
- require 'test/unit'
4
-
5
- class TestHelperMethods < Test::Unit::TestCase
6
-
7
- class ::Rim
8
- attr_accessor :some_new_attr
9
- end
10
-
11
- def setup
12
- @rim = Rim.instance
13
- end
14
-
15
- def test_attr_accessor
16
- assert_nil @rim.some_new_attr, 'New attribute must be nil.'
17
- @rim.some_new_attr = :standard_setter
18
- assert_equal :standard_setter, @rim.some_new_attr
19
- @rim.some_new_attr :advanced_setter
20
- assert_equal :advanced_setter, @rim.some_new_attr
21
- end
22
-
23
- def test_filelist
24
- fl = @rim.filelist(/^rakefile/i, 'lib')
25
- assert_equal %w(Rakefile lib), fl.to_a
26
- end
27
-
28
- def test_feature_loaded
29
- assert_equal false, @rim.feature_loaded?('et/http')
30
- assert_equal false, @rim.feature_loaded?('net/htt')
31
- assert_equal false, @rim.feature_loaded?('net/http')
32
- require 'net/http'
33
- assert_equal false, @rim.feature_loaded?('et/http')
34
- assert_equal false, @rim.feature_loaded?('net/htt')
35
- assert_equal true, @rim.feature_loaded?('net/http')
36
- end
37
-
38
- end