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.
Files changed (71) hide show
  1. data/Gemfile +1 -1
  2. data/{LICENSE → LICENSE.txt} +0 -0
  3. data/Rakefile +1 -3
  4. data/assert.gemspec +15 -15
  5. data/lib/assert.rb +1 -2
  6. data/lib/assert/assert_runner.rb +2 -1
  7. data/lib/assert/assertions.rb +153 -189
  8. data/lib/assert/version.rb +1 -1
  9. data/test/helper.rb +74 -51
  10. data/test/{fixtures → support}/inherited_stuff.rb +0 -0
  11. data/test/{test → system}/running_tests.rb +16 -43
  12. data/test/{assert_test.rb → unit/assert_tests.rb} +0 -0
  13. data/test/unit/assertions/assert_block_tests.rb +57 -0
  14. data/test/unit/assertions/assert_empty_tests.rb +58 -0
  15. data/test/unit/assertions/assert_equal_tests.rb +59 -0
  16. data/test/unit/assertions/assert_file_exists_tests.rb +59 -0
  17. data/test/unit/assertions/assert_includes_tests.rb +61 -0
  18. data/test/unit/assertions/assert_instance_of_tests.rb +61 -0
  19. data/test/unit/assertions/assert_kind_of_tests.rb +60 -0
  20. data/test/unit/assertions/assert_match_tests.rb +59 -0
  21. data/test/unit/assertions/assert_nil_tests.rb +59 -0
  22. data/test/unit/assertions/assert_raises_tests.rb +73 -0
  23. data/test/unit/assertions/assert_respond_to_tests.rb +63 -0
  24. data/test/unit/assertions/assert_same_tests.rb +65 -0
  25. data/test/unit/assertions_tests.rb +65 -0
  26. data/test/unit/context/basic_singleton_tests.rb +86 -0
  27. data/test/unit/context/setup_teardown_singleton_tests.rb +105 -0
  28. data/test/unit/context/test_should_singleton_tests.rb +134 -0
  29. data/test/{context_test.rb → unit/context_tests.rb} +53 -131
  30. data/test/{macro_test.rb → unit/macro_tests.rb} +15 -11
  31. data/test/{result_test.rb → unit/result_tests.rb} +27 -26
  32. data/test/{runner_test.rb → unit/runner_tests.rb} +1 -2
  33. data/test/{suite_test.rb → unit/suite_tests.rb} +63 -95
  34. data/test/{test_test.rb → unit/test_tests.rb} +45 -77
  35. data/test/{view/base_tests.rb → unit/view_tests.rb} +0 -1
  36. metadata +63 -104
  37. data/CHANGELOG.md +0 -33
  38. data/test/assertions/assert_block_test.rb +0 -39
  39. data/test/assertions/assert_empty_test.rb +0 -43
  40. data/test/assertions/assert_equal_test.rb +0 -43
  41. data/test/assertions/assert_file_exists_test.rb +0 -43
  42. data/test/assertions/assert_includes_test.rb +0 -44
  43. data/test/assertions/assert_instance_of_test.rb +0 -43
  44. data/test/assertions/assert_kind_of_test.rb +0 -43
  45. data/test/assertions/assert_match_test.rb +0 -43
  46. data/test/assertions/assert_nil_test.rb +0 -43
  47. data/test/assertions/assert_not_block_test.rb +0 -39
  48. data/test/assertions/assert_not_empty_test.rb +0 -43
  49. data/test/assertions/assert_not_equal_test.rb +0 -43
  50. data/test/assertions/assert_not_file_exists_test.rb +0 -43
  51. data/test/assertions/assert_not_included_test.rb +0 -44
  52. data/test/assertions/assert_not_instance_of_test.rb +0 -43
  53. data/test/assertions/assert_not_kind_of_test.rb +0 -43
  54. data/test/assertions/assert_not_match_test.rb +0 -43
  55. data/test/assertions/assert_not_nil_test.rb +0 -43
  56. data/test/assertions/assert_not_respond_to_test.rb +0 -43
  57. data/test/assertions/assert_not_same_test.rb +0 -45
  58. data/test/assertions/assert_nothing_raised_test.rb +0 -46
  59. data/test/assertions/assert_raises_test.rb +0 -49
  60. data/test/assertions/assert_respond_to_test.rb +0 -43
  61. data/test/assertions/assert_same_test.rb +0 -45
  62. data/test/assertions_test.rb +0 -60
  63. data/test/context/class_methods_test.rb +0 -531
  64. data/test/fixtures/sample_context.rb +0 -13
  65. data/test/fixtures/test_root/one_test.rb +0 -0
  66. data/test/fixtures/test_root/parent/area_one/area_test.rb +0 -0
  67. data/test/fixtures/test_root/shallow/deeply/nested_test.rb +0 -0
  68. data/test/fixtures/test_root/shallow/nested_test.rb +0 -0
  69. data/test/fixtures/test_root/shallow_test.rb +0 -0
  70. data/test/fixtures/test_root/two_test.rb +0 -0
  71. data/test/suite/context_info_test.rb +0 -42
@@ -1,13 +0,0 @@
1
- class SampleContext < Assert::Context
2
-
3
- end
4
-
5
- class TwoTests < SampleContext
6
-
7
- def test_something
8
- end
9
-
10
- def test_something_else
11
- end
12
-
13
- end
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