test-unit-rr 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b9c46b20bc70dfd72ac03d84cd45889e66e7968
4
- data.tar.gz: 47ab549b1c555a829480a6ab8a9cc6c990713a99
3
+ metadata.gz: 8ccedb3909cf0bfb08a025033635a7d7c3549777
4
+ data.tar.gz: 8c7feb64d7bcd5fdf8540bc26cafd288b5ca4933
5
5
  SHA512:
6
- metadata.gz: 560fe012b32e5b0ea38e77fa7027eff5af2fe43259325610e0fb9141d0cde641d01453a0296638e3fda3fba26a807f524e451ede27314681063676f2aa3a5fd9
7
- data.tar.gz: 2d7a69183fffa818b128f86129aca2f9be2b86b7b6944198b6421b513482a130885366683d9dad280cd51734c199c2577fbd3c3d9b0b09c2568356864f941ffe
6
+ metadata.gz: 9aead7855fe10ef34bddd5e6adfad887be5cbd8bcec5eaa2d93c42745ee8cfc2d0f610647dafc6f8541ec8f96671cd4e9007aafaaad7340a81a28b69183b98df
7
+ data.tar.gz: 5f0e3f218c014fa5ce8c51713b86e88f9bc9a2111b090bf7786542e73726fc9b98f0acba9471402be78f088f24408f15f3e9497ee269ac154e4ce209671a27ba
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.0.5: 2016-01-18 {#version-1-0-5}
4
+
5
+ ### Fixes
6
+
7
+ * Fixed a bug that needless backtrace is showed in `assert_receive`.
8
+
3
9
  ## 1.0.4: 2016-01-17 {#version-1-0-4}
4
10
 
5
11
  ### Improvements
@@ -24,15 +24,18 @@ require "test/unit/rr/version"
24
24
  module Test::Unit
25
25
  module RR
26
26
  module Adapter
27
- include ::RR::Adapters::RRMethods
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
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
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.4"
20
+ VERSION = "1.0.5"
21
21
  end
22
22
  end
23
23
  end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com>
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(Test::Unit::AssertionFailedError) do
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
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-17 00:00:00.000000000 Z
11
+ date: 2016-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit