flexmock 2.0.2 → 2.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98384ea13adbc6183d9341511891b3a9f8f03d45
4
- data.tar.gz: 3590aed927dd2b5639cd89bc5ef4a94721cc019a
3
+ metadata.gz: d3cd91a2cd7045fca531029e2adb53a1c9ea8ab7
4
+ data.tar.gz: 06339a12de7b495aa97bc638d2f3212bec8890dc
5
5
  SHA512:
6
- metadata.gz: 81593e3d1ac8834dfa7a2984a5673979b9a609cd2269711be7ddaa989f31542066bbec7a26b927f9d268a0880a332d26b7db70e642abac4aa24579cadc09c933
7
- data.tar.gz: 157647079491431589151fd0a1297c7b78d8b179b73ff2e97fc2d7415cf3f8b25bf0985d5577b210490633291e83e2e4bdae57014ff2cc5140640ed28cb5f6bf
6
+ metadata.gz: 84223bf38e15aaf35aa23fa694c3b939dae18052ae2351527a5b1a029b2100c5f0b4f5788552ca90a92f4dd0058a797eb8928188f46f6abdec989b84474fda7c
7
+ data.tar.gz: 97089ec1310b4841a1a88c7f058e3d90b2bccd3108abf6c76941f2d411d53e5dba3d455b0b6defe46d667dfe213b95419c0b12dcecff37fad5a8b278e105c0b4
data/lib/flexmock/core.rb CHANGED
@@ -147,7 +147,9 @@ class FlexMock
147
147
 
148
148
  def flexmock_based_on(base_class)
149
149
  @base_class = base_class
150
- should_receive(:class => base_class)
150
+ if base_class <= Kernel
151
+ should_receive(:class => base_class)
152
+ end
151
153
  end
152
154
 
153
155
  CALL_VALIDATOR = CallValidator.new
@@ -74,8 +74,7 @@ class FlexMock
74
74
  @assertions = 0
75
75
  end
76
76
 
77
- def filtered_backtrace
78
- bt = caller
77
+ def filtered_backtrace(bt = caller)
79
78
  flexmock_dir = File.expand_path(File.dirname(__FILE__))
80
79
  while bt.first.start_with?(flexmock_dir)
81
80
  bt.shift
@@ -84,6 +83,7 @@ class FlexMock
84
83
  end
85
84
 
86
85
  def make_assertion(msg, backtrace = caller, &block)
86
+ backtrace = filtered_backtrace(backtrace)
87
87
  assert(yield, msg)
88
88
  rescue Exception => e
89
89
  e.set_backtrace backtrace
@@ -1,3 +1,3 @@
1
1
  class FlexMock
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexmock
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-16 00:00:00.000000000 Z
12
+ date: 2015-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest