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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e2c739418bd430963f4bd13337a9ede2fad3530
4
- data.tar.gz: 8a5a7d90e9a7c1169a8738c8df531d85b841f411
3
+ metadata.gz: 39450a85ddf3388cbecfa4aa0fdb0fcc88fd2c50
4
+ data.tar.gz: 8360812d1b7dacd4175bd7fd353e793e0ca9e26d
5
5
  SHA512:
6
- metadata.gz: ab36a730b55d55dee3c9eeb2420573fb4fd25542c81206e66960f38fc6a3655674e747a74901625f598a6afec3f457047fa48c9531d7e74ecc30d2eae36a0a50
7
- data.tar.gz: 62d6910efdf106bb1243f99fa871238b03a7eb7b9834a70f34e64066965f436d77012586d962e1e774a208c06bc432843d7084780a70c44864ae24963e4e5cb2
6
+ metadata.gz: bf6d0277dac3ea3dcdff50ab09e3959f9009f97263996f3f79d9835d04f8481028603f2a9798d84162b2301fead4075f87a9f4b249779ac2499652ba5da0b4c3
7
+ data.tar.gz: fdcbc2e172d15da3b9ed57208c394e2390c46b87bc60ffe34ee0916d4ee65a06d0621b8e899d0958c2458f812834c0aa7538439a85a2a3cd1d0ce5081616ffff
@@ -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
- ActiveMocker creates mock classes from ActiveRecord models,
10
- allowing your test suite to run at breakneck speed.
11
- This is done by not loading Rails or hitting the database.
12
- The models are read dynamically/statically so that ActiveMocker can generate a Ruby file to require within a test.
13
- The mock file can be run standalone and comes with many use parts of ActiveRecord included.
14
- Attributes and associations can be used the same as in ActiveRecord.
15
- Method signatures can be brought over for stubbing or ActiveMocker friendly code can be brought over in it's entirety.
16
- Mocks are regenerated when the schema is modified so your mocks won't go stale,
17
- preventing the case where your units tests pass but production code fails.
18
-
19
- Examples from a real apps
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,
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module ActiveMocker
3
- VERSION = "2.5.2"
3
+ VERSION = "2.5.3"
4
4
  module Mock
5
5
  VERSION = "2" # This increments when breaking changes happen in the generated mocks
6
6
  end
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.2
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-09-29 00:00:00.000000000 Z
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.0'
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.0'
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.2
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.2
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: ActiveMocker creates mock classes from ActiveRecord models, allowing
192
- your test suite to run at breakneck speed. This can be done by not loading Rails
193
- or hitting a database. The models are read dynamically and statically so that ActiveMocker
194
- can generate a Ruby file to require within a test. The mock file can be run by itself
195
- and comes with a partial implementation of ActiveRecord. Attributes and associations
196
- can be used the same as in ActiveRecord. Methods have the same argument signature
197
- but raise a NotImplementedError when called, allowing you to stub it with a mocking
198
- framework, like RSpec. Mocks are regenerated when the schema is modified so your
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 mocks from Active Record models. Allows your test suite to run very
306
- fast by not loading Rails or a database.
303
+ summary: Creates stub classes from any ActiveRecord model
307
304
  test_files: []