active_mocker 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -9
- data/lib/active_mocker/active_record.rb +4 -0
- data/lib/active_mocker/active_record/const_missing.rb +1 -3
- data/lib/active_mocker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fee89ae476ccff5a47b1f6c15c4a0036f5e9d3b2
|
4
|
+
data.tar.gz: 5002d95f09b0d38c150c4a588c7be78ba500916a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e864d32a9f5f989aa7a314b70d262b1750320b04edbd22efd11c50810d44f8164c0461fedd3a19e3ae0ad18c1dfb8fc19ad50764779614baab9678f00d667342
|
7
|
+
data.tar.gz: 316f7e5f90edd75801a1cd2c11ea676e6eddb379eb9a419a74099589c8557e0b757d3843bc18019ea26c597337fa4e66dcaa7cc953939cf1477569b46466d5ec
|
data/README.md
CHANGED
@@ -180,7 +180,6 @@ ActiveHash is a simple base class that allows you to use a ruby hash as a readon
|
|
180
180
|
#### #update method
|
181
181
|
|
182
182
|
person = PersonMock.create(first_name: 'Justin')
|
183
|
-
|
184
183
|
person.update(first_name: 'Dustin')
|
185
184
|
|
186
185
|
person.first_name
|
@@ -189,21 +188,18 @@ ActiveHash is a simple base class that allows you to use a ruby hash as a readon
|
|
189
188
|
|
190
189
|
#### ::destroy_all
|
191
190
|
|
192
|
-
|
193
|
-
|
194
|
-
mock_class.count
|
191
|
+
PersonMock.create
|
192
|
+
PersonMock.count
|
195
193
|
=> 1
|
196
194
|
|
197
|
-
|
198
|
-
|
199
|
-
mock_class.count
|
195
|
+
PersonMock.destroy_all
|
196
|
+
PersonMock.count
|
200
197
|
=> 0
|
201
198
|
|
202
199
|
|
203
200
|
#### ::find_by
|
204
201
|
|
205
202
|
person = PersonMock.create(first_name: 'Dustin')
|
206
|
-
|
207
203
|
PersonMock.find_by(first_name: 'Dustin') == person
|
208
204
|
=> true
|
209
205
|
|
@@ -211,7 +207,7 @@ ActiveHash is a simple base class that allows you to use a ruby hash as a readon
|
|
211
207
|
### Known Limitations
|
212
208
|
|
213
209
|
* **::mock** model names and table names must follow the default ActiveRecord naming pattern.
|
214
|
-
* Included/extended
|
210
|
+
* Included/extended module methods will not be included on the mock.
|
215
211
|
|
216
212
|
## Contributing
|
217
213
|
|