active_mocker 1.2.pre.9 → 1.2.pre.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_mocker/class_exists.rb +12 -0
- data/lib/active_mocker/mock_template.erb +1 -1
- data/lib/active_mocker/version.rb +1 -1
- data/mocks/micropost_mock.rb +1 -1
- data/mocks/relationship_mock.rb +1 -1
- data/mocks/user_mock.rb +1 -1
- data/spec/mocks/user_mock.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4714d7ff79296aea01e1b4f408cded30243ba4f
|
4
|
+
data.tar.gz: 80a17102f27b2bebb21628e7047856fd91653096
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3257d142ee5150575d9ca0de79eb6c9bbe74570449867dd8a536d1dd62f0f9eaaceb06530bebb5b43741e150771b7641c7bc3942bdb9433e227cac857b64d32
|
7
|
+
data.tar.gz: e93ef0984489dc89ff11d52f8bc31e029433be6f6d0f11116a56d5ab77ebef6d0ad53b401f351a403d95143fb8d4d7450b4b49f1116ef7e48e59bf741be8ada1
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'active_mocker/mock_requires'
|
2
|
-
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker
|
2
|
+
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker.class_exists?("#{model_name}Mock")
|
3
3
|
|
4
4
|
class <%= class_name %> < ::ActiveHash::Base
|
5
5
|
include ActiveMocker::ActiveHash::ARApi
|
data/mocks/micropost_mock.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'active_mocker/mock_requires'
|
2
|
-
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker
|
2
|
+
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker.class_exists?("#{model_name}Mock")
|
3
3
|
|
4
4
|
class MicropostMock < ::ActiveHash::Base
|
5
5
|
include ActiveMocker::ActiveHash::ARApi
|
data/mocks/relationship_mock.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'active_mocker/mock_requires'
|
2
|
-
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker
|
2
|
+
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker.class_exists?("#{model_name}Mock")
|
3
3
|
|
4
4
|
class RelationshipMock < ::ActiveHash::Base
|
5
5
|
include ActiveMocker::ActiveHash::ARApi
|
data/mocks/user_mock.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'active_mocker/mock_requires'
|
2
|
-
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker
|
2
|
+
Object.send(:remove_const, "#{model_name}Mock") if false && ActiveMocker.class_exists?("#{model_name}Mock")
|
3
3
|
|
4
4
|
class UserMock < ::ActiveHash::Base
|
5
5
|
include ActiveMocker::ActiveHash::ARApi
|
data/spec/mocks/user_mock.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'active_mocker/mock_requires'
|
2
2
|
|
3
|
-
Object.send(:remove_const, 'UserMock') if class_exists? 'UserMock'
|
3
|
+
Object.send(:remove_const, 'UserMock') if ActiveMocker.class_exists? 'UserMock'
|
4
4
|
|
5
5
|
class UserMock < ::ActiveHash::Base
|
6
6
|
include ActiveMocker::ActiveHash::ARApi
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_mocker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.pre.
|
4
|
+
version: 1.2.pre.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Zeisler
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- lib/active_mocker/active_record/scope.rb
|
153
153
|
- lib/active_mocker/active_record/unknown_class_method.rb
|
154
154
|
- lib/active_mocker/active_record/unknown_module.rb
|
155
|
+
- lib/active_mocker/class_exists.rb
|
155
156
|
- lib/active_mocker/collection_association.rb
|
156
157
|
- lib/active_mocker/config.rb
|
157
158
|
- lib/active_mocker/const_sets.rb
|