assert 2.0.0.rc.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/{LICENSE → LICENSE.txt} +0 -0
- data/Rakefile +1 -3
- data/assert.gemspec +15 -15
- data/lib/assert.rb +1 -2
- data/lib/assert/assert_runner.rb +2 -1
- data/lib/assert/assertions.rb +153 -189
- data/lib/assert/version.rb +1 -1
- data/test/helper.rb +74 -51
- data/test/{fixtures → support}/inherited_stuff.rb +0 -0
- data/test/{test → system}/running_tests.rb +16 -43
- data/test/{assert_test.rb → unit/assert_tests.rb} +0 -0
- data/test/unit/assertions/assert_block_tests.rb +57 -0
- data/test/unit/assertions/assert_empty_tests.rb +58 -0
- data/test/unit/assertions/assert_equal_tests.rb +59 -0
- data/test/unit/assertions/assert_file_exists_tests.rb +59 -0
- data/test/unit/assertions/assert_includes_tests.rb +61 -0
- data/test/unit/assertions/assert_instance_of_tests.rb +61 -0
- data/test/unit/assertions/assert_kind_of_tests.rb +60 -0
- data/test/unit/assertions/assert_match_tests.rb +59 -0
- data/test/unit/assertions/assert_nil_tests.rb +59 -0
- data/test/unit/assertions/assert_raises_tests.rb +73 -0
- data/test/unit/assertions/assert_respond_to_tests.rb +63 -0
- data/test/unit/assertions/assert_same_tests.rb +65 -0
- data/test/unit/assertions_tests.rb +65 -0
- data/test/unit/context/basic_singleton_tests.rb +86 -0
- data/test/unit/context/setup_teardown_singleton_tests.rb +105 -0
- data/test/unit/context/test_should_singleton_tests.rb +134 -0
- data/test/{context_test.rb → unit/context_tests.rb} +53 -131
- data/test/{macro_test.rb → unit/macro_tests.rb} +15 -11
- data/test/{result_test.rb → unit/result_tests.rb} +27 -26
- data/test/{runner_test.rb → unit/runner_tests.rb} +1 -2
- data/test/{suite_test.rb → unit/suite_tests.rb} +63 -95
- data/test/{test_test.rb → unit/test_tests.rb} +45 -77
- data/test/{view/base_tests.rb → unit/view_tests.rb} +0 -1
- metadata +63 -104
- data/CHANGELOG.md +0 -33
- data/test/assertions/assert_block_test.rb +0 -39
- data/test/assertions/assert_empty_test.rb +0 -43
- data/test/assertions/assert_equal_test.rb +0 -43
- data/test/assertions/assert_file_exists_test.rb +0 -43
- data/test/assertions/assert_includes_test.rb +0 -44
- data/test/assertions/assert_instance_of_test.rb +0 -43
- data/test/assertions/assert_kind_of_test.rb +0 -43
- data/test/assertions/assert_match_test.rb +0 -43
- data/test/assertions/assert_nil_test.rb +0 -43
- data/test/assertions/assert_not_block_test.rb +0 -39
- data/test/assertions/assert_not_empty_test.rb +0 -43
- data/test/assertions/assert_not_equal_test.rb +0 -43
- data/test/assertions/assert_not_file_exists_test.rb +0 -43
- data/test/assertions/assert_not_included_test.rb +0 -44
- data/test/assertions/assert_not_instance_of_test.rb +0 -43
- data/test/assertions/assert_not_kind_of_test.rb +0 -43
- data/test/assertions/assert_not_match_test.rb +0 -43
- data/test/assertions/assert_not_nil_test.rb +0 -43
- data/test/assertions/assert_not_respond_to_test.rb +0 -43
- data/test/assertions/assert_not_same_test.rb +0 -45
- data/test/assertions/assert_nothing_raised_test.rb +0 -46
- data/test/assertions/assert_raises_test.rb +0 -49
- data/test/assertions/assert_respond_to_test.rb +0 -43
- data/test/assertions/assert_same_test.rb +0 -45
- data/test/assertions_test.rb +0 -60
- data/test/context/class_methods_test.rb +0 -531
- data/test/fixtures/sample_context.rb +0 -13
- data/test/fixtures/test_root/one_test.rb +0 -0
- data/test/fixtures/test_root/parent/area_one/area_test.rb +0 -0
- data/test/fixtures/test_root/shallow/deeply/nested_test.rb +0 -0
- data/test/fixtures/test_root/shallow/nested_test.rb +0 -0
- data/test/fixtures/test_root/shallow_test.rb +0 -0
- data/test/fixtures/test_root/two_test.rb +0 -0
- data/test/suite/context_info_test.rb +0 -42
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'assert'
|
2
|
-
|
3
|
-
class Assert::Suite::ContextInfo
|
4
|
-
|
5
|
-
class BasicTests < Assert::Context
|
6
|
-
desc "a suite's context info"
|
7
|
-
setup do
|
8
|
-
@caller = caller
|
9
|
-
@klass = Assert::Context
|
10
|
-
@info = Assert::Suite::ContextInfo.new(@klass, nil, @caller.first)
|
11
|
-
end
|
12
|
-
subject { @info }
|
13
|
-
|
14
|
-
should have_readers :called_from, :first_caller, :klass, :file
|
15
|
-
|
16
|
-
should "set its klass on init" do
|
17
|
-
assert_equal @klass, subject.klass
|
18
|
-
end
|
19
|
-
|
20
|
-
should "set its called_from to the first caller on init" do
|
21
|
-
assert_equal @caller.first, subject.first_caller
|
22
|
-
end
|
23
|
-
|
24
|
-
should "set its file from caller info on init" do
|
25
|
-
assert_equal @caller.first.gsub(/\:[0-9]+.*$/, ''), subject.file
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
class KlassOnlyTests < BasicTests
|
31
|
-
desc "w/ only klass information"
|
32
|
-
setup do
|
33
|
-
@info = Assert::Suite::ContextInfo.new(@klass)
|
34
|
-
end
|
35
|
-
|
36
|
-
should "not have any file info" do
|
37
|
-
assert_nil subject.file
|
38
|
-
end
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
end
|