flexmock 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/lib/flexmock/core.rb +4 -0
- data/lib/flexmock/mock_builder.rb +9 -3
- data/lib/flexmock/version.rb +1 -1
- 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: 33bb2c48e90a98ffbe177d885fdedd82aa7c7fc8
|
4
|
+
data.tar.gz: 2c6dfcfac4032dd6fdd3110c204f5c91939e4104
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74fdc213dda95788d74cfd973f2f7309611d0b21838c309d2c86a8013660f42057685d7f198498ff878f6fae34e3e4e3b27886ff5eb6e36a771bdfcca4e291fe
|
7
|
+
data.tar.gz: 558319ae76251ca95e1eaedd13114ecf77540e95160700595a01a07f86cb027cc84b4c64317518ae7a189b18431343d55254204756e87d91943df2c6913c34fb
|
data/.travis.yml
CHANGED
data/lib/flexmock/core.rb
CHANGED
@@ -105,9 +105,15 @@ class FlexMock
|
|
105
105
|
when :base, :safe
|
106
106
|
opts.safe_mode = (args.shift == :safe)
|
107
107
|
opts.domain_obj = args.shift
|
108
|
-
when :on
|
109
|
-
args.shift
|
110
|
-
|
108
|
+
when :on, :strict
|
109
|
+
if args.shift == :strict
|
110
|
+
if !opts.domain_obj
|
111
|
+
raise ArgumentError, "cannot use :strict outside a partial mock"
|
112
|
+
end
|
113
|
+
opts.base_class = opts.domain_obj.class
|
114
|
+
else
|
115
|
+
opts.base_class = args.shift
|
116
|
+
end
|
111
117
|
opts.name ||= "#{opts.base_class} Mock"
|
112
118
|
else
|
113
119
|
CONTAINER_HELPER.extensions.each do |ext|
|
data/lib/flexmock/version.rb
CHANGED
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.
|
4
|
+
version: 2.0.6
|
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: 2016-
|
12
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|