arbitrary_mock 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -73
- data/README.md +2 -9
- data/arbitrary_mock.gemspec +3 -3
- data/lib/arbitrary_mock/version.rb +1 -1
- data/spec/{base_spec.rb → arbitrary_mock/base_spec.rb} +5 -0
- metadata +7 -28
- checksums.yaml.gz.sig +0 -2
- data.tar.gz.sig +0 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15247826067dca8d5df6a11a64fb3a47905013b5
|
4
|
+
data.tar.gz: eb29ae2b66f1913e849960189a96efa53d400e7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d7ea0a65965d21739b7fa383c7f00e626ea9b5a798db628aa4bfb02f3e1d240c7340aa1fbd3c3167493d53cbef350fad56ec0ae9a93e40decee89730ef5caf
|
7
|
+
data.tar.gz: 33cd8f28a9b8cefc687c54ed376ffcfb2d06296aade904ce5d757053e14e126021b10dc390f2a5aa5fd5b88a63b348ae84793a399aa48418de4d069782edc251
|
data/Gemfile.lock
CHANGED
@@ -1,67 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
arbitrary_mock (0.0.
|
5
|
-
rails (>= 2.3.0)
|
6
|
-
rspec (>= 2.0.0)
|
4
|
+
arbitrary_mock (0.0.3)
|
7
5
|
|
8
6
|
GEM
|
9
7
|
remote: https://rubygems.org/
|
10
8
|
specs:
|
11
|
-
actionmailer (4.0.0)
|
12
|
-
actionpack (= 4.0.0)
|
13
|
-
mail (~> 2.5.3)
|
14
|
-
actionpack (4.0.0)
|
15
|
-
activesupport (= 4.0.0)
|
16
|
-
builder (~> 3.1.0)
|
17
|
-
erubis (~> 2.7.0)
|
18
|
-
rack (~> 1.5.2)
|
19
|
-
rack-test (~> 0.6.2)
|
20
|
-
activemodel (4.0.0)
|
21
|
-
activesupport (= 4.0.0)
|
22
|
-
builder (~> 3.1.0)
|
23
|
-
activerecord (4.0.0)
|
24
|
-
activemodel (= 4.0.0)
|
25
|
-
activerecord-deprecated_finders (~> 1.0.2)
|
26
|
-
activesupport (= 4.0.0)
|
27
|
-
arel (~> 4.0.0)
|
28
|
-
activerecord-deprecated_finders (1.0.3)
|
29
|
-
activesupport (4.0.0)
|
30
|
-
i18n (~> 0.6, >= 0.6.4)
|
31
|
-
minitest (~> 4.2)
|
32
|
-
multi_json (~> 1.3)
|
33
|
-
thread_safe (~> 0.1)
|
34
|
-
tzinfo (~> 0.3.37)
|
35
|
-
arel (4.0.0)
|
36
|
-
atomic (1.1.14)
|
37
|
-
builder (3.1.4)
|
38
9
|
diff-lcs (1.2.4)
|
39
|
-
erubis (2.7.0)
|
40
|
-
hike (1.2.3)
|
41
|
-
i18n (0.6.5)
|
42
|
-
mail (2.5.4)
|
43
|
-
mime-types (~> 1.16)
|
44
|
-
treetop (~> 1.4.8)
|
45
|
-
mime-types (1.25)
|
46
|
-
minitest (4.7.5)
|
47
|
-
multi_json (1.8.2)
|
48
|
-
polyglot (0.3.3)
|
49
|
-
rack (1.5.2)
|
50
|
-
rack-test (0.6.2)
|
51
|
-
rack (>= 1.0)
|
52
|
-
rails (4.0.0)
|
53
|
-
actionmailer (= 4.0.0)
|
54
|
-
actionpack (= 4.0.0)
|
55
|
-
activerecord (= 4.0.0)
|
56
|
-
activesupport (= 4.0.0)
|
57
|
-
bundler (>= 1.3.0, < 2.0)
|
58
|
-
railties (= 4.0.0)
|
59
|
-
sprockets-rails (~> 2.0.0)
|
60
|
-
railties (4.0.0)
|
61
|
-
actionpack (= 4.0.0)
|
62
|
-
activesupport (= 4.0.0)
|
63
|
-
rake (>= 0.8.7)
|
64
|
-
thor (>= 0.18.1, < 2.0)
|
65
10
|
rake (10.1.0)
|
66
11
|
rspec (2.14.1)
|
67
12
|
rspec-core (~> 2.14.0)
|
@@ -71,26 +16,12 @@ GEM
|
|
71
16
|
rspec-expectations (2.14.3)
|
72
17
|
diff-lcs (>= 1.1.3, < 2.0)
|
73
18
|
rspec-mocks (2.14.4)
|
74
|
-
sprockets (2.10.0)
|
75
|
-
hike (~> 1.2)
|
76
|
-
multi_json (~> 1.0)
|
77
|
-
rack (~> 1.0)
|
78
|
-
tilt (~> 1.1, != 1.3.0)
|
79
|
-
sprockets-rails (2.0.1)
|
80
|
-
actionpack (>= 3.0)
|
81
|
-
activesupport (>= 3.0)
|
82
|
-
sprockets (~> 2.8)
|
83
|
-
thor (0.18.1)
|
84
|
-
thread_safe (0.1.3)
|
85
|
-
atomic
|
86
|
-
tilt (1.4.1)
|
87
|
-
treetop (1.4.15)
|
88
|
-
polyglot
|
89
|
-
polyglot (>= 0.3.1)
|
90
|
-
tzinfo (0.3.38)
|
91
19
|
|
92
20
|
PLATFORMS
|
93
21
|
ruby
|
94
22
|
|
95
23
|
DEPENDENCIES
|
96
24
|
arbitrary_mock!
|
25
|
+
bundler (~> 1.3)
|
26
|
+
rake
|
27
|
+
rspec (>= 2.0.0)
|
data/README.md
CHANGED
@@ -15,21 +15,14 @@ specific assertions about the way the class functions.
|
|
15
15
|
=> #<ArbitraryMock::Base:0x007f97710eade8 @property_hash={:foo=>"bar"}>
|
16
16
|
2.0.0p247 :005 > mock.foo
|
17
17
|
=> "bar"
|
18
|
-
2.0.0p247 :006 > mock.property_hash
|
19
|
-
=> nil
|
20
18
|
2.0.0p247 :007 > mock.foo = 'baz'
|
21
19
|
=> "baz"
|
22
|
-
2.0.0p247 :008 > mock.foo
|
23
|
-
=> "baz"
|
24
20
|
2.0.0p247 :009 > mock.foo << 'quux'
|
25
21
|
=> "bazquux"
|
26
|
-
2.0.0p247 :010 > mock.foo
|
27
|
-
=> "bazquux"
|
28
|
-
2.0.0p247 :011 >
|
29
22
|
|
30
23
|
### Usage
|
31
|
-
|
32
|
-
Model
|
24
|
+
# Check if it already exists, if so we don't need to fake it
|
25
|
+
Model ||= ArbitraryMock::Base
|
33
26
|
dependency = Model.new(foo: 'bar')
|
34
27
|
Model.stub(new: dependency)
|
35
28
|
|
data/arbitrary_mock.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = ArbitraryMock::VERSION
|
9
9
|
spec.authors = ["Robert White"]
|
10
10
|
spec.email = ["robert@terracoding.com"]
|
11
|
-
spec.summary
|
12
|
-
spec.description
|
13
|
-
spec.homepage = "
|
11
|
+
spec.summary = "Basic object for asserting behaviour of classes upon their dependencies"
|
12
|
+
spec.description = "Basic series of objects designed to allow you to arbitrarily assign and access properties, for use in conjunction with typical isolated testing style."
|
13
|
+
spec.homepage = "http://github.com/Haar/arbitrary_mock"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
@@ -17,4 +17,9 @@ describe ArbitraryMock::Base do
|
|
17
17
|
mock.foo << 'bang'
|
18
18
|
expect(mock.foo).to match 'barbang'
|
19
19
|
end
|
20
|
+
|
21
|
+
it 'allows you to overload a class for isolated settings' do
|
22
|
+
MyClass ||= ArbitraryMock::Base
|
23
|
+
MyClass.new(foo: 'bar').foo.should == 'bar'
|
24
|
+
end
|
20
25
|
end
|
metadata
CHANGED
@@ -1,35 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arbitrary_mock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert White
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDOjCCAiKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBDMQ8wDQYDVQQDDAZyb2Jl
|
14
|
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ZWM9g6qKB6OgUOhQ2+wahgqP65E
|
29
|
-
yOQEOf/NLAgxfk2F5mfx7TKOUIDwF0kOPsRyelhOeiHrH/7gAL6VMD3eaFwHYDbL
|
30
|
-
+IKaQB3NaFv3kZnspdg=
|
31
|
-
-----END CERTIFICATE-----
|
32
|
-
date: 2013-10-18 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-26 00:00:00.000000000 Z
|
33
12
|
dependencies:
|
34
13
|
- !ruby/object:Gem::Dependency
|
35
14
|
name: bundler
|
@@ -91,8 +70,8 @@ files:
|
|
91
70
|
- lib/arbitrary_mock.rb
|
92
71
|
- lib/arbitrary_mock/base.rb
|
93
72
|
- lib/arbitrary_mock/version.rb
|
94
|
-
- spec/base_spec.rb
|
95
|
-
homepage:
|
73
|
+
- spec/arbitrary_mock/base_spec.rb
|
74
|
+
homepage: http://github.com/Haar/arbitrary_mock
|
96
75
|
licenses:
|
97
76
|
- MIT
|
98
77
|
metadata: {}
|
@@ -112,9 +91,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
91
|
version: '0'
|
113
92
|
requirements: []
|
114
93
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.0.
|
94
|
+
rubygems_version: 2.0.3
|
116
95
|
signing_key:
|
117
96
|
specification_version: 4
|
118
97
|
summary: Basic object for asserting behaviour of classes upon their dependencies
|
119
98
|
test_files:
|
120
|
-
- spec/base_spec.rb
|
99
|
+
- spec/arbitrary_mock/base_spec.rb
|
checksums.yaml.gz.sig
DELETED
data.tar.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
�/SK�ğ}8qD�]�'w�Y�4X����Y�_@2�(�g�%tb��>�&y;LE>i;R���^ δZ��*�3p'���/T���@ZR�P�!I�r�:W;U��ϡ���v�m�`�91�K]n�Y�Ā��f�.sG��_�r��]߶������/&t���}���;�ͺ9k��e�L\V�k�o�m��X��]�NGRD�������+Pa/?����0ez����Q���;���
|
metadata.gz.sig
DELETED
Binary file
|