assert 2.16.3 → 2.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@ class Assert::Runner
33
33
  should have_readers :config
34
34
  should have_imeths :runner, :run
35
35
  should have_imeths :before_load, :after_load
36
- should have_imeths :on_start, :on_finish, :on_interrupt
36
+ should have_imeths :on_start, :on_finish, :on_info, :on_interrupt
37
37
  should have_imeths :before_test, :after_test, :on_result
38
38
 
39
39
  should "know its config" do
@@ -42,7 +42,9 @@ class Assert::Stub
42
42
  end
43
43
 
44
44
  should "complain when called if no do block was given" do
45
- assert_raises(Assert::NotStubbedError){ @myobj.mymeth }
45
+ err = assert_raises(Assert::NotStubbedError){ @myobj.mymeth }
46
+ assert_includes 'not stubbed.', err.message
47
+ assert_includes 'test/unit/stub_tests.rb', err.backtrace.first
46
48
 
47
49
  subject.do = proc{ 'mymeth' }
48
50
  assert_nothing_raised do
@@ -55,7 +57,9 @@ class Assert::Stub
55
57
  end
56
58
 
57
59
  should "complain if stubbing a method that the object doesn't respond to" do
58
- assert_raises(Assert::StubError){ Assert::Stub.new(@myobj, :some_other_meth) }
60
+ err = assert_raises(Assert::StubError){ Assert::Stub.new(@myobj, :some_other_meth) }
61
+ assert_includes 'does not respond to', err.message
62
+ assert_includes 'test/unit/stub_tests.rb', err.backtrace.first
59
63
  end
60
64
 
61
65
  should "complain if stubbed and called with no `do` proc given" do
@@ -64,7 +68,10 @@ class Assert::Stub
64
68
 
65
69
  should "complain if stubbed and called with mismatched arity" do
66
70
  Assert::Stub.new(@myobj, :myval){ 'myval' }
67
- assert_raises(Assert::StubArityError){ @myobj.myval }
71
+ err = assert_raises(Assert::StubArityError){ @myobj.myval }
72
+ assert_includes 'arity mismatch on', err.message
73
+ assert_includes 'test/unit/stub_tests.rb', err.backtrace.first
74
+
68
75
  assert_nothing_raised { @myobj.myval(1) }
69
76
  assert_raises(Assert::StubArityError){ @myobj.myval(1,2) }
70
77
 
@@ -81,9 +88,12 @@ class Assert::Stub
81
88
  end
82
89
 
83
90
  should "complain if stubbed with mismatched arity" do
84
- assert_raises(Assert::StubArityError) do
91
+ err = assert_raises(Assert::StubArityError) do
85
92
  Assert::Stub.new(@myobj, :myval).with(){ 'myval' }
86
93
  end
94
+ assert_includes 'arity mismatch on', err.message
95
+ assert_includes 'test/unit/stub_tests.rb', err.backtrace.first
96
+
87
97
  assert_raises(Assert::StubArityError) do
88
98
  Assert::Stub.new(@myobj, :myval).with(1,2){ 'myval' }
89
99
  end
@@ -40,7 +40,7 @@ class Assert::Suite
40
40
  should have_imeths :fail_result_count, :error_result_count
41
41
  should have_imeths :skip_result_count, :ignore_result_count
42
42
  should have_imeths :before_load, :on_test, :after_load
43
- should have_imeths :on_start, :on_finish, :on_interrupt
43
+ should have_imeths :on_start, :on_finish, :on_info, :on_interrupt
44
44
  should have_imeths :before_test, :after_test, :on_result
45
45
 
46
46
  should "know its config" do
@@ -37,7 +37,7 @@ class Assert::View
37
37
  should have_readers :config
38
38
  should have_imeths :view, :is_tty?
39
39
  should have_imeths :before_load, :after_load
40
- should have_imeths :on_start, :on_finish, :on_interrupt
40
+ should have_imeths :on_start, :on_finish, :on_info, :on_interrupt
41
41
  should have_imeths :before_test, :after_test, :on_result
42
42
 
43
43
  should "default its style options" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assert
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.3
4
+ version: 2.16.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2016-08-15 00:00:00 Z
13
+ date: 2018-05-13 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: Assertion style testing framework.
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  requirements: []
127
127
 
128
128
  rubyforge_project:
129
- rubygems_version: 2.6.4
129
+ rubygems_version: 2.6.6
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Assertion style testing framework.