test-unit-rr 1.0.4 → 1.0.5
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.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/test/unit/rr.rb +13 -5
- data/lib/test/unit/rr/version.rb +2 -2
- data/test/test-rr.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ccedb3909cf0bfb08a025033635a7d7c3549777
|
4
|
+
data.tar.gz: 8c7feb64d7bcd5fdf8540bc26cafd288b5ca4933
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aead7855fe10ef34bddd5e6adfad887be5cbd8bcec5eaa2d93c42745ee8cfc2d0f610647dafc6f8541ec8f96671cd4e9007aafaaad7340a81a28b69183b98df
|
7
|
+
data.tar.gz: 5f0e3f218c014fa5ce8c51713b86e88f9bc9a2111b090bf7786542e73726fc9b98f0acba9471402be78f088f24408f15f3e9497ee269ac154e4ce209671a27ba
|
data/doc/text/news.md
CHANGED
data/lib/test/unit/rr.rb
CHANGED
@@ -24,15 +24,18 @@ require "test/unit/rr/version"
|
|
24
24
|
module Test::Unit
|
25
25
|
module RR
|
26
26
|
module Adapter
|
27
|
-
|
27
|
+
if ::RR.const_defined?(:DSL)
|
28
|
+
include ::RR::DSL
|
29
|
+
else
|
30
|
+
include ::RR::Adapters::RRMethods
|
31
|
+
end
|
28
32
|
|
29
33
|
class << self
|
30
34
|
def included(mod)
|
31
|
-
::RR.trim_backtrace = true
|
32
35
|
mod.module_eval do
|
33
36
|
setup :before => :prepend
|
34
37
|
def setup_rr
|
35
|
-
::RR.reset
|
38
|
+
::Test::Unit::RR::Adapter.reset
|
36
39
|
end
|
37
40
|
|
38
41
|
cleanup :after => :append
|
@@ -51,6 +54,11 @@ module Test::Unit
|
|
51
54
|
end
|
52
55
|
end
|
53
56
|
end
|
57
|
+
|
58
|
+
def reset
|
59
|
+
::RR.reset
|
60
|
+
::RR.trim_backtrace = true
|
61
|
+
end
|
54
62
|
end
|
55
63
|
|
56
64
|
def assert_received(subject, &block)
|
@@ -85,13 +93,13 @@ module Test::Unit
|
|
85
93
|
begin
|
86
94
|
::RR.verify
|
87
95
|
ensure
|
88
|
-
::RR.reset
|
96
|
+
::Test::Unit::RR::Adapter.reset
|
89
97
|
end
|
90
98
|
result = yield
|
91
99
|
begin
|
92
100
|
::RR.verify
|
93
101
|
ensure
|
94
|
-
::RR.reset
|
102
|
+
::Test::Unit::RR::Adapter.reset
|
95
103
|
end
|
96
104
|
result
|
97
105
|
end
|
data/lib/test/unit/rr/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -17,7 +17,7 @@
|
|
17
17
|
module Test
|
18
18
|
module Unit
|
19
19
|
module RR
|
20
|
-
VERSION = "1.0.
|
20
|
+
VERSION = "1.0.5"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/test/test-rr.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2012-
|
1
|
+
# Copyright (C) 2012-2016 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -30,7 +30,7 @@ class RRTest < Test::Unit::TestCase
|
|
30
30
|
stub(subject).should_be_called
|
31
31
|
stub(subject).should_not_be_called
|
32
32
|
subject.should_be_called
|
33
|
-
assert_raise(
|
33
|
+
assert_raise(RR::Errors::SpyVerificationErrors::InvocationCountError) do
|
34
34
|
assert_received(subject) do |_subject|
|
35
35
|
_subject.should_not_be_called
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-unit-rr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|