active_mocker 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +13 -11
- data/lib/active_mocker/mock_creator/defined_methods.rb +1 -0
- data/lib/active_mocker/version.rb +1 -1
- metadata +15 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39450a85ddf3388cbecfa4aa0fdb0fcc88fd2c50
|
4
|
+
data.tar.gz: 8360812d1b7dacd4175bd7fd353e793e0ca9e26d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf6d0277dac3ea3dcdff50ab09e3959f9009f97263996f3f79d9835d04f8481028603f2a9798d84162b2301fead4075f87a9f4b249779ac2499652ba5da0b4c3
|
7
|
+
data.tar.gz: fdcbc2e172d15da3b9ed57208c394e2390c46b87bc60ffe34ee0916d4ee65a06d0621b8e899d0958c2458f812834c0aa7538439a85a2a3cd1d0ce5081616ffff
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## 2.5.3 - 2017-10-01
|
5
|
+
### Fix
|
6
|
+
- Update gem dependency to fix Macro `ActiveMocker.safe_methods` when marking class_methods.
|
7
|
+
|
4
8
|
## 2.5.2 - 2017-09-29
|
5
9
|
### Feature
|
6
10
|
- Add mockable class methods to relations.
|
data/README.md
CHANGED
@@ -6,17 +6,19 @@
|
|
6
6
|
[![Gittip](http://img.shields.io/gittip/zeisler.svg)](https://www.gittip.com/zeisler/)
|
7
7
|
|
8
8
|
## Description
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
Creates stub classes from any ActiveRecord model.
|
10
|
+
|
11
|
+
By using stubs in your tests you don't need to load Rails or the database, sometimes resulting in a 10x speed improvement.
|
12
|
+
|
13
|
+
ActiveMocker analyzes the methods and database columns to generate a Ruby class file.
|
14
|
+
|
15
|
+
The stub file can be run standalone and comes included with many useful parts of ActiveRecord.
|
16
|
+
|
17
|
+
Stubbed out methods contain their original argument signatures or ActiveMocker friendly code can be brought over in its entirety.
|
18
|
+
|
19
|
+
Mocks are regenerated when the schema is modified so your mocks won't go stale, preventing the case where your unit tests pass but production code fails.
|
20
|
+
|
21
|
+
*Examples from a real apps*
|
20
22
|
|
21
23
|
Finished in 1 seconds
|
22
24
|
374 examples, 0 failures
|
@@ -27,6 +27,7 @@ module ActiveMocker
|
|
27
27
|
if safe_methods[plural_type].include?(m)
|
28
28
|
def_type = type == :method ? :class_defs : :defs
|
29
29
|
def_method = class_introspector.parsed_source.public_send(def_type).detect { |meth| meth.name == m }
|
30
|
+
raise "ActiveMocker.safe_methods is unable to find #{plural_type}: #{m}" unless def_method
|
30
31
|
Method.new(
|
31
32
|
m,
|
32
33
|
def_method.arguments,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_mocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Zeisler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
19
|
+
version: '4.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
26
|
+
version: '4.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: virtus
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +135,7 @@ dependencies:
|
|
135
135
|
version: '0.8'
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.8.
|
138
|
+
version: 0.8.4
|
139
139
|
type: :runtime
|
140
140
|
prerelease: false
|
141
141
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -145,7 +145,7 @@ dependencies:
|
|
145
145
|
version: '0.8'
|
146
146
|
- - ">="
|
147
147
|
- !ruby/object:Gem::Version
|
148
|
-
version: 0.8.
|
148
|
+
version: 0.8.4
|
149
149
|
- !ruby/object:Gem::Dependency
|
150
150
|
name: bundler
|
151
151
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,16 +188,14 @@ dependencies:
|
|
188
188
|
- - "~>"
|
189
189
|
- !ruby/object:Gem::Version
|
190
190
|
version: '3.4'
|
191
|
-
description:
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
mocks won't go stale, preventing the case where your units tests pass but production
|
200
|
-
code fails.
|
191
|
+
description: Creates stub classes from any ActiveRecord model. By using stubs in your
|
192
|
+
tests you don't need to load Rails or the database, sometimes resulting in a 10x
|
193
|
+
speed improvement. ActiveMocker analyzes the methods and database columns to generate
|
194
|
+
a Ruby class file. The stub file can be run standalone and comes included with many
|
195
|
+
useful parts of ActiveRecord. Stubbed out methods contain their original argument
|
196
|
+
signatures or ActiveMocker friendly code can be brought over in its entirety. Mocks
|
197
|
+
are regenerated when the schema is modified so your mocks won't go stale, preventing
|
198
|
+
the case where your unit tests pass but production code fails.
|
201
199
|
email:
|
202
200
|
- dustin@zeisler.net
|
203
201
|
executables: []
|
@@ -302,6 +300,5 @@ rubyforge_project:
|
|
302
300
|
rubygems_version: 2.5.1
|
303
301
|
signing_key:
|
304
302
|
specification_version: 4
|
305
|
-
summary: Creates
|
306
|
-
fast by not loading Rails or a database.
|
303
|
+
summary: Creates stub classes from any ActiveRecord model
|
307
304
|
test_files: []
|