micro_mock 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/micro_mock/version.rb +1 -1
- data/lib/micro_mock.rb +3 -1
- metadata +2 -2
data/lib/micro_mock/version.rb
CHANGED
data/lib/micro_mock.rb
CHANGED
@@ -17,8 +17,10 @@ module MicroMock
|
|
17
17
|
|
18
18
|
# Creates an attribute getter & setter.
|
19
19
|
# @param [Symbol] name The name of the attribute.
|
20
|
-
|
20
|
+
# @param [Object] default_value An optional default value.
|
21
|
+
def attr(name, default_value=nil)
|
21
22
|
context.send :attr_accessor, name
|
23
|
+
instance_variable_set "@#{name}", default_value
|
22
24
|
end
|
23
25
|
|
24
26
|
# Stubs a method.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: micro_mock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-23 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! ' Perhaps the lightest mocking strategy available.
|
15
15
|
|