slimkeyfy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +34 -0
  3. data/.rspec +3 -0
  4. data/Gemfile +6 -0
  5. data/Gemfile.lock +22 -0
  6. data/LICENSE +21 -0
  7. data/README.md +172 -0
  8. data/bin/slimkeyfy +5 -0
  9. data/lib/.DS_Store +0 -0
  10. data/lib/slimkeyfy/console/command_line.rb +90 -0
  11. data/lib/slimkeyfy/console/io_action.rb +30 -0
  12. data/lib/slimkeyfy/console/printer.rb +50 -0
  13. data/lib/slimkeyfy/console/translate.rb +101 -0
  14. data/lib/slimkeyfy/console.rb +8 -0
  15. data/lib/slimkeyfy/slimutils/file_utils.rb +61 -0
  16. data/lib/slimkeyfy/slimutils/hash_merging.rb +84 -0
  17. data/lib/slimkeyfy/slimutils/key_generator.rb +70 -0
  18. data/lib/slimkeyfy/slimutils/yaml_processor.rb +56 -0
  19. data/lib/slimkeyfy/slimutils.rb +8 -0
  20. data/lib/slimkeyfy/transformer/base_transformer.rb +42 -0
  21. data/lib/slimkeyfy/transformer/controller_transformer.rb +20 -0
  22. data/lib/slimkeyfy/transformer/slim_transformer.rb +92 -0
  23. data/lib/slimkeyfy/transformer/whitespacer.rb +48 -0
  24. data/lib/slimkeyfy/transformer/word.rb +49 -0
  25. data/lib/slimkeyfy/transformer.rb +9 -0
  26. data/lib/slimkeyfy/version.rb +3 -0
  27. data/lib/slimkeyfy.rb +12 -0
  28. data/slimkeyfy.gemspec +21 -0
  29. data/vendor/bundle/bin/htmldiff +25 -0
  30. data/vendor/bundle/bin/ldiff +25 -0
  31. data/vendor/bundle/bin/rspec +23 -0
  32. data/vendor/bundle/build_info/diff-lcs-1.2.5.info +1 -0
  33. data/vendor/bundle/build_info/rspec-3.0.0.info +1 -0
  34. data/vendor/bundle/build_info/rspec-core-3.0.2.info +1 -0
  35. data/vendor/bundle/build_info/rspec-expectations-3.0.2.info +1 -0
  36. data/vendor/bundle/build_info/rspec-mocks-3.0.2.info +1 -0
  37. data/vendor/bundle/build_info/rspec-support-3.0.2.info +1 -0
  38. data/vendor/bundle/gems/diff-lcs-1.2.5/.autotest +3 -0
  39. data/vendor/bundle/gems/diff-lcs-1.2.5/.gemtest +0 -0
  40. data/vendor/bundle/gems/diff-lcs-1.2.5/.hoerc +2 -0
  41. data/vendor/bundle/gems/diff-lcs-1.2.5/.rspec +2 -0
  42. data/vendor/bundle/gems/diff-lcs-1.2.5/.travis.yml +22 -0
  43. data/vendor/bundle/gems/diff-lcs-1.2.5/Contributing.rdoc +64 -0
  44. data/vendor/bundle/gems/diff-lcs-1.2.5/Gemfile +20 -0
  45. data/vendor/bundle/gems/diff-lcs-1.2.5/History.rdoc +152 -0
  46. data/vendor/bundle/gems/diff-lcs-1.2.5/License.rdoc +39 -0
  47. data/vendor/bundle/gems/diff-lcs-1.2.5/Manifest.txt +38 -0
  48. data/vendor/bundle/gems/diff-lcs-1.2.5/README.rdoc +85 -0
  49. data/vendor/bundle/gems/diff-lcs-1.2.5/Rakefile +41 -0
  50. data/vendor/bundle/gems/diff-lcs-1.2.5/autotest/discover.rb +1 -0
  51. data/vendor/bundle/gems/diff-lcs-1.2.5/bin/htmldiff +32 -0
  52. data/vendor/bundle/gems/diff-lcs-1.2.5/bin/ldiff +6 -0
  53. data/vendor/bundle/gems/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
  54. data/vendor/bundle/gems/diff-lcs-1.2.5/docs/artistic.txt +127 -0
  55. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
  56. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
  57. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
  58. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
  59. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
  60. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
  61. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
  62. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
  63. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
  64. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
  65. data/vendor/bundle/gems/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
  66. data/vendor/bundle/gems/rspec-3.0.0/License.txt +24 -0
  67. data/vendor/bundle/gems/rspec-3.0.0/README.md +47 -0
  68. data/vendor/bundle/gems/rspec-3.0.0/lib/rspec.rb +3 -0
  69. data/vendor/bundle/gems/rspec-core-3.0.2/.document +5 -0
  70. data/vendor/bundle/gems/rspec-core-3.0.2/.yardopts +7 -0
  71. data/vendor/bundle/gems/rspec-core-3.0.2/Changelog.md +1466 -0
  72. data/vendor/bundle/gems/rspec-core-3.0.2/License.txt +25 -0
  73. data/vendor/bundle/gems/rspec-core-3.0.2/README.md +243 -0
  74. data/vendor/bundle/gems/rspec-core-3.0.2/exe/rspec +4 -0
  75. data/vendor/bundle/gems/rspec-expectations-3.0.2/.document +5 -0
  76. data/vendor/bundle/gems/rspec-expectations-3.0.2/.yardopts +6 -0
  77. data/vendor/bundle/gems/rspec-expectations-3.0.2/Changelog.md +749 -0
  78. data/vendor/bundle/gems/rspec-expectations-3.0.2/License.txt +24 -0
  79. data/vendor/bundle/gems/rspec-expectations-3.0.2/README.md +278 -0
  80. data/vendor/bundle/gems/rspec-mocks-3.0.2/.document +5 -0
  81. data/vendor/bundle/gems/rspec-mocks-3.0.2/.yardopts +6 -0
  82. data/vendor/bundle/gems/rspec-mocks-3.0.2/Changelog.md +733 -0
  83. data/vendor/bundle/gems/rspec-mocks-3.0.2/License.txt +24 -0
  84. data/vendor/bundle/gems/rspec-mocks-3.0.2/README.md +380 -0
  85. data/vendor/bundle/gems/rspec-support-3.0.2/Changelog.md +30 -0
  86. data/vendor/bundle/gems/rspec-support-3.0.2/LICENSE.txt +22 -0
  87. data/vendor/bundle/gems/rspec-support-3.0.2/README.md +17 -0
  88. data/vendor/bundle/specifications/diff-lcs-1.2.5.gemspec +68 -0
  89. data/vendor/bundle/specifications/rspec-3.0.0.gemspec +43 -0
  90. data/vendor/bundle/specifications/rspec-core-3.0.2.gemspec +66 -0
  91. data/vendor/bundle/specifications/rspec-expectations-3.0.2.gemspec +51 -0
  92. data/vendor/bundle/specifications/rspec-mocks-3.0.2.gemspec +48 -0
  93. data/vendor/bundle/specifications/rspec-support-3.0.2.gemspec +42 -0
  94. metadata +153 -0
@@ -0,0 +1,733 @@
1
+ ### 3.0.2 / 2014-06-19
2
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.1...v3.0.2)
3
+
4
+ Bug Fixes:
5
+
6
+ * Fix edge case that triggered "can't add a new key into hash during
7
+ iteration" during mock verification. (Sam Phippen, Myron Marston, #711)
8
+ * Fix verifying doubles so that when they accidentally leak into another
9
+ example, they provide the same clear error message that normal doubles
10
+ do. (Myron Marston, #718)
11
+ * Make `ordered` work with exact receive counts. (Sam Phippen, #713)
12
+
13
+ ### 3.0.1 / 2014-06-07
14
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0...v3.0.1)
15
+
16
+ Bug Fixes:
17
+
18
+ * Fix `receive_message_chain(...)` so that it supports `with` just like
19
+ `stub_chain` did. (Jon Rowe, #697)
20
+ * Fix regression in `expect_any_instance_of` so that it expects the
21
+ message on _any_ instance rather than on _every_ instance.
22
+ (Myron Marston, #699)
23
+
24
+ ### 3.0.0 / 2014-06-01
25
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.rc1...v3.0.0)
26
+
27
+ Bug Fixes:
28
+
29
+ * Fix module prepend detection to work properly on ruby 2.0 for a case
30
+ where a module is extended onto itself. (Myron Marston)
31
+ * Fix `transfer_nested_constants` option so that transferred constants
32
+ get properly reset at the end of the example. (Myron Marston)
33
+ * Fix `config.transfer_nested_constants = true` so that you don't
34
+ erroneously get errors when stubbing a constant that is not a module
35
+ or a class. (Myron Marston)
36
+ * Fix regression that caused `double(:class => SomeClass)` to later
37
+ trigger infinite recursion. (Myron Marston)
38
+ * Fix bug in `have_received(...).with(...).ordered` where it was not
39
+ taking the args into account when checking the order. (Myron Marston)
40
+ * Fix bug in `have_received(...).ordered` where it was wrongly
41
+ considering stubs when checking the order. (Myron Marston)
42
+ * Message expectation matchers now show descriptions from argument
43
+ matchers when their expectations aren't met. (Jon Rowe)
44
+ * Display warning when encountering `TypeError` during instance method
45
+ staging on 2.0.0-p195, suffers from https://bugs.ruby-lang.org/issues/8686
46
+ too. (Cezar Halmagean).
47
+
48
+ ### 3.0.0.rc1 / 2014-05-18
49
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.beta2...v3.0.0.rc1)
50
+
51
+ Breaking Changes for 3.0.0:
52
+
53
+ * Remove `RSpec::Mocks::TestDouble.extend_onto`. (Myron Marston)
54
+ * Remove `RSpec::Mocks::ConstantStubber`. (Jon Rowe)
55
+ * Make monkey-patch of Marshal to support dumping of stubbed objects opt-in.
56
+ (Xavier Shay)
57
+
58
+ Enhancements:
59
+
60
+ * Instead of crashing when cleaning up stub methods on a frozen object, it now
61
+ issues a warning explaining that it's impossible to clean up the stubs.
62
+ (Justin Coyne and Sam Phippen)
63
+ * Add meaningful descriptions to `anything`, `duck_type` and `instance_of` argument
64
+ matchers. (Jon Rowe)
65
+
66
+ Bug Fixes:
67
+
68
+ * Fix regression introduced in 3.0.0.beta2 that caused
69
+ `double.as_null_object.to_str` to return the double rather
70
+ than a string. (Myron Marston)
71
+ * Fix bug in `expect(dbl).to receive_message_chain(:foo, :bar)` where it was
72
+ not setting an expectation for the last message in the chain.
73
+ (Jonathan del Strother)
74
+ * Allow verifying partial doubles to have private methods stubbed. (Xavier Shay)
75
+ * Fix bug with allowing/expecting messages on Class objects which have had
76
+ their singleton class prepended to. (Jon Rowe)
77
+ * Fix an issue with 1.8.7 not running implementation blocks on partial doubles.
78
+ (Maurício Linhares)
79
+ * Prevent `StackLevelTooDeep` errors when stubbing an `any_instance` method that's
80
+ accessed in `inspect` by providing our own inspect output. (Jon Rowe)
81
+ * Fix bug in `any_instance` logic that did not allow you to mock or stub
82
+ private methods if `verify_partial_doubles` was configured. (Oren Dobzinski)
83
+ * Include useful error message when trying to observe an unimplemented method
84
+ on an any instance. (Xavier Shay)
85
+ * Fix `and_call_original` to work properly when multiple classes in an
86
+ inheritance hierarchy have been stubbed with the same method. (Myron Marston)
87
+ * Fix `any_instance` so that it updates existing instances that have
88
+ already been stubbed. (Myron Marston)
89
+ * Fix verified doubles so that their class name is included in failure
90
+ messages. (Myron Marston)
91
+ * Fix `expect_any_instance_of` so that when the message is received
92
+ on an individual instance that has been directly stubbed, it still
93
+ satisfies the expectation. (Sam Phippen, Myron Marston)
94
+ * Explicitly disallow using `any_instance` to mock or stub a method
95
+ that is defined on a module prepended onto the class. This triggered
96
+ `SystemStackError` before and is very hard to support so we are not
97
+ supporting it at this time. (Myron Marston)
98
+
99
+ ### 3.0.0.beta2 / 2014-02-17
100
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.beta1...v3.0.0.beta2)
101
+
102
+ Breaking Changes for 3.0.0:
103
+
104
+ * Rename `RSpec::Mocks::Mock` to `RSpec::Mocks::Double`. (Myron Marston)
105
+ * Change how to integrate rspec-mocks in other test frameworks. You now
106
+ need to include `RSpec::Mocks::ExampleMethods` in your test context.
107
+ (Myron Marston)
108
+ * Prevent RSpec mocks' doubles and partial doubles from being used outside of
109
+ the per-test lifecycle (e.g. from a `before(:all)` hook). (Sam Phippen)
110
+ * Remove the `host` argument of `RSpec::Mocks.setup`. Instead
111
+ `RSpec::Mocks::ExampleMethods` should be included directly in the scope where
112
+ RSpec's mocking capabilities are used. (Sam Phippen)
113
+ * Make test doubles raise errors if you attempt to use them after they
114
+ get reset, to help surface issues when you accidentally retain
115
+ references to test doubles and attempt to reuse them in another
116
+ example. (Myron Marston)
117
+ * Remove support for `and_return { value }` and `and_return` without arguments. (Yuji Nakayama)
118
+
119
+ Enhancements:
120
+
121
+ * Add `receive_message_chain` which provides the functionality of the old
122
+ `stub_chain` for the new allow/expect syntax. Use it like so: `allow(...).to
123
+ receive_message_chain(:foo, :bar, :bazz)`. (Sam Phippen).
124
+ * Change argument matchers to use `===` as their primary matching
125
+ protocol, since their semantics mirror that of a case or rescue statement
126
+ (which uses `===` for matching). (Myron Marston)
127
+ * Add `RSpec::Mocks.with_temporary_scope`, which allows you to create
128
+ temporary rspec-mocks scopes in arbitrary places (such as a
129
+ `before(:all)` hook). (Myron Marston)
130
+ * Support keyword arguments when checking arity with verifying doubles.
131
+ (Xavier Shay)
132
+
133
+ Bug Fixes:
134
+
135
+ * Fix regression in 3.0.0.beta1 that caused `double("string_name" => :value)`
136
+ to stop working. (Xavier Shay)
137
+ * Fix the way rspec-mocks and rspec-core interact so that if users
138
+ define a `let` with the same name as one of the methods
139
+ from `RSpec::Mocks::ArgumentMatchers`, the user's `let` takes
140
+ precedence. (Michi Huber, Myron Marston)
141
+ * Fix verified doubles so that their methods match the visibility
142
+ (public, protected or private) of the interface they verify
143
+ against. (Myron Marston)
144
+ * Fix verified null object doubles so that they do not wrongly
145
+ report that they respond to anything. They only respond to methods
146
+ available on the interface they verify against. (Myron Marston)
147
+ * Fix deprecation warning for use of old `:should` syntax w/o explicit
148
+ config so that it no longer is silenced by an extension gem such
149
+ as rspec-rails when it calls `config.add_stub_and_should_receive_to`.
150
+ (Sam Phippen)
151
+ * Fix `expect` syntax so that it does not wrongly emit a "You're
152
+ overriding a previous implementation for this stub" warning when
153
+ you are not actually doing that. (Myron Marston)
154
+ * Fix `any_instance.unstub` when used on sub classes for whom the super
155
+ class has had `any_instance.stub` invoked on. (Jon Rowe)
156
+ * Fix regression in `stub_chain`/`receive_message_chain` that caused
157
+ it to raise an `ArgumentError` when passing args to the stubbed
158
+ methods. (Sam Phippen)
159
+ * Correct stub of undefined parent modules all the way down when stubbing a
160
+ nested constant. (Xavier Shay)
161
+ * Raise `VerifyingDoubleNotDefinedError` when a constant is not defined for
162
+ a verifying class double. (Maurício Linhares)
163
+ * Remove `Double#to_str`, which caused confusing `raise some_double`
164
+ behavior. (Maurício Linhares)
165
+
166
+ ### 3.0.0.beta1 / 2013-11-07
167
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0...v3.0.0.beta1)
168
+
169
+ Breaking Changes for 3.0.0:
170
+
171
+ * Raise an explicit error if `should_not_receive(...).and_return` is used. (Sam
172
+ Phippen)
173
+ * Remove 1.8.6 workarounds. (Jon Rowe)
174
+ * Remove `stub!` and `unstub!`. (Sam Phippen)
175
+ * Remove `mock(name, methods)` and `stub(name, methods)`, leaving
176
+ `double(name, methods)` for creating test doubles. (Sam Phippen, Michi Huber)
177
+ * Remove `any_number_of_times` since `should_receive(:msg).any_number_of_times`
178
+ is really a stub in a mock's clothing. (Sam Phippen)
179
+ * Remove support for re-using the same null-object test double in multiple
180
+ examples. Test doubles are designed to only live for one example.
181
+ (Myron Marston)
182
+ * Make `at_least(0)` raise an error. (Sam Phippen)
183
+ * Remove support for `require 'spec/mocks'` which had been kept
184
+ in place for backwards compatibility with RSpec 1. (Myron Marston)
185
+ * Blocks provided to `with` are always used as implementation. (Xavier Shay)
186
+ * The config option (added in 2.99) to yield the receiver to
187
+ `any_instance` implementation blocks now defaults to "on". (Sam Phippen)
188
+
189
+ Enhancements:
190
+
191
+ * Allow the `have_received` matcher to use a block to set further expectations
192
+ on arguments. (Tim Cowlishaw)
193
+ * Provide `instance_double` and `class_double` to create verifying doubles,
194
+ ported from `rspec-fire`. (Xavier Shay)
195
+ * `as_null_object` on a verifying double only responds to defined methods.
196
+ (Xavier Shay)
197
+ * Provide `object_double` to create verified doubles of specific object
198
+ instances. (Xavier Shay)
199
+ * Provide `verify_partial_doubles` configuration that provides `object_double`
200
+ like verification behaviour on partial doubles. (Xavier Shay)
201
+ * Improved performance of double creation, particularly those with many
202
+ attributes. (Xavier Shay)
203
+ * Default value of `transfer_nested_constants` option for constant stubbing can
204
+ be configured. (Xavier Shay)
205
+ * Messages can be allowed or expected on in bulk via
206
+ `receive_messages(:message => :value)`. (Jon Rowe)
207
+ * `allow(Klass.any_instance)` and `expect(Klass.any_instance)` now print a
208
+ warning. This is usually a mistake, and users usually want
209
+ `allow_any_instance_of` or `expect_any_instance_of` instead. (Sam Phippen)
210
+ * `instance_double` and `class_double` raise `ArgumentError` if the underlying
211
+ module is loaded and the arity of the method being invoked does not match the
212
+ arity of the method as it is actually implemented. (Andy Lindeman)
213
+ * Spies can now check their invocation ordering is correct. (Jon Rowe)
214
+
215
+ Deprecations:
216
+
217
+ * Using the old `:should` syntax without explicitly configuring it
218
+ is deprecated. It will continue to work but will emit a deprecation
219
+ warning in RSpec 3 if you do not explicitly enable it. (Sam Phippen)
220
+
221
+ Bug Fixes:
222
+
223
+ * Fix `and_call_original` to handle a complex edge case involving
224
+ singleton class ancestors. (Marc-André Lafortune, Myron Marston)
225
+ * When generating an error message for unexpected arguments,
226
+ use `#inspect` rather than `#description` if `#description`
227
+ returns `nil` or `''` so that you still get a useful message.
228
+ (Nick DeLuca)
229
+
230
+ ### 2.99.1 / 2014-06-12
231
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0...v2.99.1)
232
+
233
+ Bug Fixes:
234
+
235
+ * Fix bug that caused errors at the end of each example
236
+ when a `double.as_null_object` had been frozen. (Yuji Nakayama, #698)
237
+
238
+ Deprecations:
239
+
240
+ * Deprecate freezing a test double. (Yuji Nakayama, #698)
241
+
242
+ ### 2.99.0 / 2014-06-01
243
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.rc1...v2.99.0)
244
+
245
+ No changes. Just taking it out of pre-release.
246
+
247
+ ### 2.99.0.rc1 / 2014-05-18
248
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.beta2...v2.99.0.rc1)
249
+
250
+ Deprecations:
251
+
252
+ * Deprecate `RSpec::Mocks::TestDouble.extend_onto`. (Myron Marston)
253
+ * Deprecate `RSpec::Mocks::ConstantStubber`. (Jon Rowe)
254
+ * Deprecate `Marshal.dump` monkey-patch without opt-in. (Xavier Shay)
255
+
256
+ ### 2.99.0.beta2 / 2014-02-17
257
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0.beta1...v2.99.0.beta2)
258
+
259
+ Deprecations:
260
+
261
+ * Deprecate `RSpec::Mocks::Mock` in favor of `RSpec::Mocks::Double`.
262
+ (Myron Marston)
263
+ * Deprecate the `host` argument of `RSpec::Mocks.setup`. Instead
264
+ `RSpec::Mocks::ExampleMethods` should be included directly in the scope where
265
+ RSpec's mocking capabilities are used. (Sam Phippen)
266
+ * Deprecate using any of rspec-mocks' features outside the per-test
267
+ lifecycle (e.g. from a `before(:all)` hook). (Myron Marston)
268
+ * Deprecate re-using a test double in another example. (Myron Marston)
269
+ * Deprecate `and_return { value }` and `and_return` without arguments. (Yuji Nakayama)
270
+
271
+ ### 2.99.0.beta1 / 2013-11-07
272
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.4...v2.99.0.beta1)
273
+
274
+ Deprecations
275
+
276
+ * Expecting to use lambdas or other strong arity implementations for stub
277
+ methods with mis-matched arity is deprecated and support for them will be
278
+ removed in 3.0. Either provide the right amount of arguments or use a weak
279
+ arity implementation (methods with splats or procs). (Jon Rowe)
280
+ * Using the same test double instance in multiple examples is deprecated. Test
281
+ doubles are only meant to live for one example. The mocks and stubs have
282
+ always been reset between examples; however, in 2.x the `as_null_object`
283
+ state was not reset and some users relied on this to have a null object
284
+ double that is used for many examples. This behavior will be removed in 3.0.
285
+ (Myron Marston)
286
+ * Print a detailed warning when an `any_instance` implementation block is used
287
+ when the new `yield_receiver_to_any_instance_implementation_blocks` config
288
+ option is not explicitly set, as RSpec 3.0 will default to enabling this new
289
+ feature. (Sam Phippen)
290
+
291
+ Enhancements:
292
+
293
+ * Add a config option to yield the receiver to `any_instance` implementation
294
+ blocks. (Sam Phippen)
295
+
296
+ ### 2.14.6 / 2014-02-20
297
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.5...v2.14.6)
298
+
299
+ Bug Fixes:
300
+
301
+ * Ensure `any_instance` method stubs and expectations are torn down regardless of
302
+ expectation failures. (Sam Phippen)
303
+
304
+ ### 2.14.5 / 2014-02-01
305
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.4...v2.14.5)
306
+
307
+ Bug Fixes:
308
+
309
+ * Fix regression that caused block implementations to not receive all
310
+ args on 1.8.7 if the block also receives a block, due to Proc#arity
311
+ reporting `1` no matter how many args the block receives if it
312
+ receives a block, too. (Myron Marston)
313
+
314
+ ### 2.14.4 / 2013-10-15
315
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.3...v2.14.4)
316
+
317
+ Bug Fixes:
318
+
319
+ * Fix issue where unstubing methods on "any instances" would not
320
+ remove stubs on existing instances (Jon Rowe)
321
+ * Fix issue with receive(:message) do ... end precedence preventing
322
+ the usage of modifications (`and_return` etc) (Jon Rowe)
323
+
324
+ ### 2.14.3 / 2013-08-08
325
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.2...v2.14.3)
326
+
327
+ Bug Fixes:
328
+
329
+ * Fix stubbing some instance methods for classes whose hierarchy includes
330
+ a prepended Module (Bradley Schaefer)
331
+
332
+ ### 2.14.2 / 2013-07-30
333
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.1...v2.14.2)
334
+
335
+ Bug Fixes:
336
+
337
+ * Fix `as_null_object` doubles so that they return `nil` from `to_ary`
338
+ (Jon Rowe).
339
+ * Fix regression in 2.14 that made `stub!` (with an implicit receiver)
340
+ return a test double rather than stub a method (Myron Marston).
341
+
342
+ ### 2.14.1 / 2013-07-07
343
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.0...v2.14.1)
344
+
345
+ Bug Fixes:
346
+
347
+ * Restore `double.as_null_object` behavior from 2.13 and earlier: a
348
+ double's nullness persisted between examples in earlier examples.
349
+ While this is not an intended use case (test doubles are meant to live
350
+ for only one example), we don't want to break behavior users rely
351
+ on in a minor relase. This will be deprecated in 2.99 and removed
352
+ in 3.0. (Myron Marston)
353
+
354
+ ### 2.14.0 / 2013-07-06
355
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.14.0.rc1...v2.14.0)
356
+
357
+ Enhancements:
358
+
359
+ * Document test spies in the readme. (Adarsh Pandit)
360
+ * Add an `array_including` matcher. (Sam Phippen)
361
+ * Add a syntax-agnostic API for mocking or stubbing a method. This is
362
+ intended for use by libraries such as rspec-rails that need to mock
363
+ or stub a method, and work regardless of the syntax the user has
364
+ configured (Paul Annesley, Myron Marston and Sam Phippen).
365
+
366
+ Bug Fixes:
367
+
368
+ * Fix `double` so that it sets up passed stubs correctly regardless of
369
+ the configured syntax (Paul Annesley).
370
+ * Allow a block implementation to be used in combination with
371
+ `and_yield`, `and_raise`, `and_return` or `and_throw`. This got fixed
372
+ in 2.13.1 but failed to get merged into master for the 2.14.0.rc1
373
+ release (Myron Marston).
374
+ * `Marshal.dump` does not unnecessarily duplicate objects when rspec-mocks has
375
+ not been fully initialized. This could cause errors when using `spork` or
376
+ similar preloading gems (Andy Lindeman).
377
+
378
+ ### 2.14.0.rc1 / 2013-05-27
379
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.13.0...v2.14.0.rc1)
380
+
381
+ Enhancements:
382
+
383
+ * Refactor internals so that the mock proxy methods and state are held
384
+ outside of the mocked object rather than inside it. This paves the way
385
+ for future syntax enhancements and removes the need for some hacky
386
+ work arounds for `any_instance` dup'ing and `YAML` serialization,
387
+ among other things. Note that the code now relies upon `__id__`
388
+ returning a unique, consistent value for any object you want to
389
+ mock or stub (Myron Marston).
390
+ * Add support for test spies. This allows you to verify a message
391
+ was received afterwards using the `have_received` matcher.
392
+ Note that you must first stub the method or use a null double.
393
+ (Joe Ferris and Joël Quenneville)
394
+ * Make `at_least` and `at_most` style receive expectations print that they were
395
+ expecting at least or at most some number of calls, rather than just the
396
+ number of calls given in the expectation (Sam Phippen)
397
+ * Make `with` style receive expectations print the args they were expecting, and
398
+ the args that they got (Sam Phippen)
399
+ * Fix some warnings seen under ruby 2.0.0p0 (Sam Phippen).
400
+ * Add a new `:expect` syntax for message expectations
401
+ (Myron Marston and Sam Phippen).
402
+
403
+ Bug fixes
404
+
405
+ * Fix `any_instance` so that a frozen object can be `dup`'d when methods
406
+ have been stubbed on that type using `any_instance` (Jon Rowe).
407
+ * Fix `and_call_original` so that it properly raises an `ArgumentError`
408
+ when the wrong number of args are passed (Jon Rowe).
409
+ * Fix `double` on 1.9.2 so you can wrap them in an Array
410
+ using `Array(my_double)` (Jon Rowe).
411
+ * Fix `stub_const` and `hide_const` to handle constants that redefine `send`
412
+ (Sam Phippen).
413
+ * Fix `Marshal.dump` extension so that it correctly handles nil.
414
+ (Luke Imhoff, Jon Rowe)
415
+ * Fix isolation of `allow_message_expectations_on_nil` (Jon Rowe)
416
+ * Use inspect to format actual arguments on expectations in failure messages (#280, Ben Langfeld)
417
+ * Protect against improperly initialised test doubles (#293) (Joseph Shraibman and Jon Rowe)
418
+
419
+ Deprecations
420
+
421
+ * Deprecate `stub` and `mock` as aliases for `double`. `double` is the
422
+ best term for creating a test double, and it reduces confusion to
423
+ have only one term (Michi Huber).
424
+ * Deprecate `stub!` and `unstub!` in favor of `stub` and `unstub`
425
+ (Jon Rowe).
426
+ * Deprecate `at_least(0).times` and `any_number_of_times` (Michi Huber).
427
+
428
+ ### 2.13.1 / 2013-04-06
429
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.13.0...v2.13.1)
430
+
431
+ Bug fixes
432
+
433
+ * Allow a block implementation to be used in combination with
434
+ `and_yield`, `and_raise`, `and_return` or `and_throw` (Myron Marston).
435
+
436
+ ### 2.13.0 / 2013-02-23
437
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.12.2...v2.13.0)
438
+
439
+ Bug fixes
440
+
441
+ * Fix bug that caused weird behavior when a method that had
442
+ previously been stubbed with multiple return values (e.g.
443
+ `obj.stub(:foo).and_return(1, 2)`) was later mocked with a
444
+ single return value (e.g. `obj.should_receive(:foo).once.and_return(1)`).
445
+ (Myron Marston)
446
+ * Fix bug related to a mock expectation for a method that already had
447
+ multiple stubs with different `with` constraints. Previously, the
448
+ first stub was used, even though it may not have matched the passed
449
+ args. The fix defers this decision until the message is received so
450
+ that the proper stub response can be chosen based on the passed
451
+ arguments (Myron Marston).
452
+ * Do not call `nil?` extra times on a mocked object, in case `nil?`
453
+ itself is expected a set number of times (Myron Marston).
454
+ * Fix `missing_default_stub_error` message so array args are handled
455
+ properly (Myron Marston).
456
+ * Explicitly disallow `any_instance.unstub!` (Ryan Jones).
457
+ * Fix `any_instance` stubbing so that it works with `Delegator`
458
+ subclasses (Myron Marston).
459
+ * Fix `and_call_original` so that it works with `Delegator` subclasses
460
+ (Myron Marston).
461
+ * Fix `any_instance.should_not_receive` when `any_instance.should_receive`
462
+ is used on the same class in the same example. Previously it would
463
+ wrongly report a failure even when the message was not received
464
+ (Myron Marston).
465
+
466
+ ### 2.12.2 / 2013-01-27
467
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.12.1...v.2.12.2)
468
+
469
+ Bug fixes
470
+
471
+ * Fix `and_call_original` to work properly for methods defined
472
+ on a module extended onto an object instance (Myron Marston).
473
+ * Fix `stub_const` with an undefined constnat name to work properly
474
+ with constant strings that are prefixed with `::` -- and edge case
475
+ I missed in the bug fix in the 2.12.1 release (Myron Marston).
476
+ * Ensure method visibility on a partial mock is restored after reseting
477
+ method stubs, even on a singleton module (created via `extend self`)
478
+ when the method visibility differs between the instance and singleton
479
+ versions (Andy Lindeman).
480
+
481
+ ### 2.12.1 / 2012-12-21
482
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.12.0...v2.12.1)
483
+
484
+ Bug fixes
485
+
486
+ * Fix `any_instance` to support `and_call_original`.
487
+ (Myron Marston)
488
+ * Properly restore stubbed aliased methods on rubies
489
+ that report the incorrect owner (Myron Marston and Andy Lindeman).
490
+ * Fix `hide_const` and `stub_const` with a defined constnat name to
491
+ work properly with constant strings that are prefixed with `::` (Myron Marston).
492
+
493
+ ### 2.12.0 / 2012-11-12
494
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.3...v2.12.0)
495
+
496
+ Enhancements
497
+
498
+ * `and_raise` can accept an exception class and message, more closely
499
+ matching `Kernel#raise` (e.g., `foo.stub(:bar).and_raise(RuntimeError, "message")`)
500
+ (Bas Vodde)
501
+ * Add `and_call_original`, which will delegate the message to the
502
+ original method (Myron Marston).
503
+
504
+ Deprecations:
505
+
506
+ * Add deprecation warning when using `and_return` with `should_not_receive`
507
+ (Neha Kumari)
508
+
509
+ ### 2.11.3 / 2012-09-19
510
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.2...v2.11.3)
511
+
512
+ Bug fixes
513
+
514
+ * Fix `:transfer_nested_constants` option of `stub_const` so that it
515
+ doesn't blow up when there are inherited constants. (Myron Marston)
516
+ * `any_instance` stubs can be used on classes that override `Object#method`.
517
+ (Andy Lindeman)
518
+ * Methods stubbed with `any_instance` are unstubbed after the test finishes.
519
+ (Andy Lindeman)
520
+ * Fix confusing error message when calling a mocked class method an
521
+ extra time with the wrong arguments (Myron Marston).
522
+
523
+ ### 2.11.2 / 2012-08-11
524
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.1...v2.11.2)
525
+
526
+ Bug fixes
527
+
528
+ * Don't modify `dup` on classes that don't support `dup` (David Chelimsky)
529
+ * Fix `any_instance` so that it works properly with methods defined on
530
+ a superclass. (Daniel Eguzkiza)
531
+ * Fix `stub_const` so that it works properly for nested constants that
532
+ share a name with a top-level constant (e.g. "MyGem::Hash"). (Myron
533
+ Marston)
534
+
535
+ ### 2.11.1 / 2012-07-09
536
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.11.0...v2.11.1)
537
+
538
+ Bug fixes
539
+
540
+ * Fix `should_receive` so that when it is called on an `as_null_object`
541
+ double with no implementation, and there is a previous explicit stub
542
+ for the same method, the explicit stub remains (rather than being
543
+ overriden with the null object implementation--`return self`). (Myron Marston)
544
+
545
+ ### 2.11.0 / 2012-07-07
546
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.10.1...v2.11.0)
547
+
548
+ Enhancements
549
+
550
+ * Expose ArgumentListMatcher as a formal API
551
+ * supports use by 3rd party mock frameworks like Surrogate
552
+ * Add `stub_const` API to stub constants for the duration of an
553
+ example (Myron Marston).
554
+
555
+ Bug fixes
556
+
557
+ * Fix regression of edge case behavior. `double.should_receive(:foo) { a }`
558
+ was causing a NoMethodError when `double.stub(:foo).and_return(a, b)`
559
+ had been setup before (Myron Marston).
560
+ * Infinite loop generated by using `any_instance` and `dup`. (Sidu Ponnappa @kaiwren)
561
+ * `double.should_receive(:foo).at_least(:once).and_return(a)` always returns a
562
+ even if `:foo` is already stubbed.
563
+ * Prevent infinite loop when interpolating a null double into a string
564
+ as an integer (`"%i" % double.as_null_object`). (Myron Marston)
565
+ * Fix `should_receive` so that null object behavior (e.g. returning
566
+ self) is preserved if no implementation is given (Myron Marston).
567
+ * Fix `and_raise` so that it raises `RuntimeError` rather than
568
+ `Exception` by default, just like ruby does. (Andrew Marshall)
569
+
570
+ ### 2.10.1 / 2012-05-05
571
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.10.0...v2.10.1)
572
+
573
+ Bug fixes
574
+
575
+ * fix regression of edge case behavior
576
+ (https://github.com/rspec/rspec-mocks/issues/132)
577
+ * fixed failure of `object.should_receive(:message).at_least(0).times.and_return value`
578
+ * fixed failure of `object.should_not_receive(:message).and_return value`
579
+
580
+ ### 2.10.0 / 2012-05-03
581
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.9.0...v2.10.0)
582
+
583
+ Bug fixes
584
+
585
+ * fail fast when an `exactly` or `at_most` expectation is exceeded
586
+
587
+ ### 2.9.0 / 2012-03-17
588
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.8.0...v2.9.0)
589
+
590
+ Enhancements
591
+
592
+ * Support order constraints across objects (preethiramdev)
593
+
594
+ Bug fixes
595
+
596
+ * Allow a `as_null_object` to be passed to `with`
597
+ * Pass proc to block passed to stub (Aubrey Rhodes)
598
+ * Initialize child message expectation args to match any args (#109 -
599
+ preethiramdev)
600
+
601
+ ### 2.8.0 / 2012-01-04
602
+
603
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.8.0.rc2...v2.8.0)
604
+
605
+ No changes for this release. Just releasing with the other rspec gems.
606
+
607
+ ### 2.8.0.rc2 / 2011-12-19
608
+
609
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.8.0.rc1...v2.8.0.rc2)
610
+
611
+ No changes for this release. Just releasing with the other rspec gems.
612
+
613
+ ### 2.8.0.rc1 / 2011-11-06
614
+
615
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.7.0...v2.8.0.rc1)
616
+
617
+ Enhancements
618
+
619
+ * Eliminate Ruby warnings (Matijs van Zuijlen)
620
+
621
+ ### 2.7.0 / 2011-10-16
622
+
623
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.6.0...v2.7.0)
624
+
625
+ Enhancements
626
+
627
+ * Use `__send__` rather than `send` (alextk)
628
+ * Add support for `any_instance.stub_chain` (Sidu Ponnappa)
629
+ * Add support for `any_instance` argument matching based on `with` (Sidu
630
+ Ponnappa and Andy Lindeman)
631
+
632
+ Changes
633
+
634
+ * Check for `failure_message_for_should` or `failure_message` instead of
635
+ `description` to detect a matcher (Tibor Claassen)
636
+
637
+ Bug fixes
638
+
639
+ * pass a hash to `any_instance.stub`. (Justin Ko)
640
+ * allow `to_ary` to be called without raising `NoMethodError` (Mikhail
641
+ Dieterle)
642
+ * `any_instance` properly restores private methods (Sidu Ponnappa)
643
+
644
+ ### 2.6.0 / 2011-05-12
645
+
646
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.5.0...v2.6.0)
647
+
648
+ Enhancements
649
+
650
+ * Add support for `any_instance.stub` and `any_instance.should_receive` (Sidu
651
+ Ponnappa and Andy Lindeman)
652
+
653
+ Bug fixes
654
+
655
+ * fix bug in which multiple chains with shared messages ending in hashes failed
656
+ to return the correct value
657
+
658
+ ### 2.5.0 / 2011-02-05
659
+
660
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.4.0...v2.5.0)
661
+
662
+ Bug fixes
663
+
664
+ * message expectation counts now work in combination with a stub (Damian
665
+ Nurzynski)
666
+ * fix failure message when message received with incorrect args (Josep M.
667
+ Bach)
668
+
669
+ ### 2.4.0 / 2011-01-02
670
+
671
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.3.0...v2.4.0)
672
+
673
+ No functional changes in this release, which was made to align with the
674
+ rspec-core-2.4.0 release.
675
+
676
+ ### 2.3.0 / 2010-12-12
677
+
678
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.2.0...v2.3.0)
679
+
680
+ Bug fixes
681
+
682
+ * Fix our Marshal extension so that it does not interfere with objects that
683
+ have their own `@mock_proxy` instance variable. (Myron Marston)
684
+
685
+ ### 2.2.0 / 2010-11-28
686
+
687
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.1.0...v2.2.0)
688
+
689
+ Enhancements
690
+
691
+ * Added "rspec/mocks/standalone" for exploring the rspec-mocks in irb.
692
+
693
+ Bug fix
694
+
695
+ * Eliminate warning on splat args without parens (Gioele Barabucci)
696
+ * Fix bug where `obj.should_receive(:foo).with(stub.as_null_object)` would pass
697
+ with a false positive.
698
+
699
+ ### 2.1.0 / 2010-11-07
700
+
701
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.1...v2.1.0)
702
+
703
+ Bug fixes
704
+
705
+ * Fix serialization of stubbed object (Josep M Bach)
706
+
707
+ ### 2.0.0 / 2010-10-10
708
+
709
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.0.beta.22...v2.0.0)
710
+
711
+ ### 2.0.0.rc / 2010-10-05
712
+
713
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.0.beta.22...v2.0.0.rc)
714
+
715
+ Enhancements
716
+
717
+ * support passing a block to an expectation block (Nicolas Braem)
718
+ * `obj.should_receive(:msg) {|&block| ... }`
719
+
720
+ Bug fixes
721
+
722
+ * Fix YAML serialization of stub (Myron Marston)
723
+ * Fix rdoc rake task (Hans de Graaff)
724
+
725
+ ### 2.0.0.beta.22 / 2010-09-12
726
+
727
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.0.0.beta.20...v2.0.0.beta.22)
728
+
729
+ Bug fixes
730
+
731
+ * fixed regression that broke `obj.stub_chain(:a, :b => :c)`
732
+ * fixed regression that broke `obj.stub_chain(:a, :b) { :c }`
733
+ * `respond_to?` always returns true when using `as_null_object`