PageRenderTime 24ms CodeModel.GetById 31ms RepoModel.GetById 0ms app.codeStats 0ms

/CHANGES.md

https://gitlab.com/Rockyspade/rr
Markdown | 504 lines | 353 code | 151 blank | 0 comment | 0 complexity | 1e4b7826b0c0f2f835bd1501fd23a6ec MD5 | raw file
  1. # Changelog
  2. ## HEAD
  3. * Rename RR::Adapters::RRMethods to RR::DSL, and deprecate RRMethods.
  4. * Fix using RSpec's RR adapter to not override our RSpec adapter.
  5. If RR is required and then you use `mock_with :rr` you would not be able to
  6. use `have_received`.
  7. ## 1.1.2 (August 17, 2013)
  8. * Add tests, appraisals, etc. back to the published gem ([#32][i32]).
  9. This is necessary because Debian wraps rr in a package, and they depend on the
  10. tests to be present in order to run them prior to packaging.
  11. * Add back RR::Adapters::RSpec2 which was removed accidentally ([#34][i34]).
  12. This fixes failures when running tests against sham_rack (which is no longer
  13. using RR, but, oh well).
  14. * Remove deprecation warning about
  15. RSpec.configuration.backtrace_clean_patterns under RSpec 2.14 ([#37][i37]).
  16. NOTE: This warning will continue to appear if you are configuring RSpec using
  17. `mock_with :rr`. This is because the RR adapter bundled with RSpec still
  18. refers to `backtrace_clean_patterns` instead of
  19. `backtrace_exclusion_patterns`. You can either wait until the next release of
  20. rspec-core, or remove `mock_with :rr` (which is recommended at this point as
  21. we consider RSpec's adapter to be slightly out of date, and RR provides its
  22. own adapter for RSpec).
  23. * RR now officially supports Rails 4.0.0. (It worked before, but now we're
  24. explicitly testing against it instead of 4.0.0.rc1.)
  25. * Fix Test::Unit 1 and 2 adapters to avoid a possible "undefined
  26. Test::Unit::TestCase" error.
  27. * Prevent adapters from being double-loaded.
  28. * Including RR::Adapters::TestUnit, RR::Adapters::MiniTest, or
  29. RR::Adapters::RSpec2 now just re-runs the autohook mechanism instead of
  30. building a fake adapter, as it was possible to include both a real and fake
  31. adapter in the same space and they could conflict with each other.
  32. ## 1.1.1 (June 17, 2013)
  33. * Fix incompatibility issues with Rails 4 ([#26][i26]) and Cucumber
  34. ([#29][i29]).
  35. * Add missing adapter for Test::Unit 2.0.0 (version which is built into Ruby
  36. 1.9/2.0). The tests for Jekyll were failing because of this ([#27][i27]).
  37. * If an error occurs while checking to see whether an adapter applies or when
  38. loading the adapter itself, it is now swallowed so that the user can move on.
  39. ## 1.1.0 (May 20, 2013)
  40. NOTE: RR development moved from [btakita/rr][btakita-rr] to [rr/rr][rr-rr].
  41. Issues are re-numbered beginning from 1 from this point on.
  42. * Fix a line in RR::Injections::DoubleInjection to use top-level RR constant
  43. ([#3][i3]) [[@Thibaut][Thibaut]]
  44. * Fix all wildcard matches so they work within hashes and arrays. This means
  45. that `stub([hash_containing(:foo => 'bar')])` will match
  46. `stub([{:foo => 'bar', :baz => 'qux'}])`. ([#4][i4])
  47. * RR now auto-hooks into whichever test framework you have loaded; there is no
  48. longer a need to `include RR::Adapters::Whatever` into your test framework. If
  49. you don't like the autohook and prefer the old way, simply use
  50. `require 'rr/without_autohook'` instead of `require 'rr'`. (There are now
  51. nine adapters; see [lib/rr/autohook.rb][autohook] for the full list.)
  52. * Fix Test::Unit adapters to ensure that any additional teardown is completely
  53. run in the event that RR's verify step produces an error. This was causing
  54. weirdness when using Test::Unit alongside Rails. ([#2][i2])
  55. * Add an explicit Test::Unit / ActiveSupport adapter. As ActiveSupport::TestCase
  56. introduces its own setup/teardown hooks, use these when autohooking in RR.
  57. ([#2][i2])
  58. * Add support for Minitest 5
  59. * Upon release, the tests are now packaged up and uploaded to S3. This is for
  60. Linux distros like Fedora who wrap gems in RPM packages. You can always find
  61. the latest tests at <http://s3.amazonaws.com/rubygem-rr/tests/vX.Y.Z.tar.gz>,
  62. where X.Y.Z represents a version. I have retroactively packaged the tests for
  63. 1.0.4 and 1.0.5.
  64. ## 1.0.5 (March 28, 2013)
  65. * Compatibility with RSpec-2. There are now two adapters for RSpec, one that
  66. works with RSpec-1 and a new one that works with RSpec-2. Currently, saying
  67. `RSpec.configure {|c| c.mock_with(:rr) }` still uses RSpec-1; to use the new
  68. one, you say `RSpec.configure {|c| c.mock_framework = RR::Adapters::RSpec2 }`.
  69. ([#66][xi66], [#68][xi68], [#80][xi80]) [[@njay][njay], [@james2m][james2m]]
  70. * Fix MethodMissingInjection so that `[stub].flatten` works without throwing a
  71. NoMethodError (`undefined method `to_ary'`) error under Ruby 1.9 ([#44][xi44])
  72. * Raise a MiniTest::Assertion error in the MiniTest adapter so that mock
  73. failures appear in the output as failures rather than uncaught exceptions
  74. ([#69][xi69]) [[@jayferd][jayferd]]
  75. * Completely remove leftover #new_instance_of method, and also remove
  76. mention of #new_instance_of from the README
  77. * Fix tests so they all work and pass again
  78. ## 1.0.4 (June 11, 2011)
  79. * Fixed bug using workaround with leftover MethodMissingInjections
  80. ## 1.0.3 (June 11, 2011)
  81. * Eliminate usage of ObjectSpace._id2ref ([#63][xi63]) [[@evanphx][evanphx]]
  82. * Added minitest adapter ([#62][xi62]) [[@cespare][cespare]]
  83. * Added instructions on installing the gem ([#57][xi57])
  84. [[@gavingmiller][gavingmiller]]
  85. * delete missing scratch.rb file from gemspec ([#60][xi60])
  86. [[@bonkydog][bonkydog]]
  87. ## 1.0.2 (November 1, 2010)
  88. * Fixed Two calls recorded to a mock expecting only one call when called via
  89. another mock's yield block ([#42][xi42]) [[@libc][libc]]
  90. ## 1.0.1 (October 30, 2010)
  91. * Removed new_instance_of for Ruby 1.9.2 compatibility. instance_of is now an
  92. alias for any_instance_of.
  93. * Compatible with Ruby 1.9.2
  94. ## 1.0.0 (August 23, 2010)
  95. * Added any_instance_of (aliased by all_instances_of), which binds methods
  96. directly to the class (instead of the eigenclass).
  97. * Subclasses of a injected class do not have their methods overridden.
  98. * any_instance_of and new_instance_of now have a block syntax
  99. ## 0.10.11 (March 22, 2010)
  100. * Added RR.blank_slate_whitelist
  101. * Fixed class_eval method redefinition warning in jruby
  102. ## 0.10.10 (February 25, 2010)
  103. * Suite passes for Ruby 1.9.1
  104. ## 0.10.9 (February 17, 2010)
  105. * Fixed 1.8.6 bug for real
  106. ## 0.10.8 (February 17, 2010)
  107. * Fixed 1.8.6 bug
  108. ## 0.10.7 (February 15, 2010)
  109. * Fixed issue with DoubleInjections binding to objects overriding the method
  110. method.
  111. ## 0.10.6 (February 15, 2010)
  112. * Added MIT license
  113. * Fixed Bug - dont_allow doesn't work when it follows stub ([#20][xi20])
  114. * Fixed exception with DoubleInjections on proxy objects ([#24][xi24])
  115. * Fixed Bug - Can't stub attribute methods on a BelongsToAssociation
  116. ([#24][xi24])
  117. ## 0.10.5 (December 20, 2009)
  118. * Fixed stack overflow caused by double include in Test::Unit adapter
  119. ([#16][xi16])
  120. * Fixed warnings [[@brynary][brynary]]
  121. ## 0.10.4 (September 26, 2009)
  122. * Handle lazily defined methods (where respond_to? returns true yet the method
  123. is not yet defined and the first call to method_missing defines the method).
  124. This pattern is used in ActiveRecord and ActionMailer.
  125. * Fixed warning about aliasing #instance_exec in jruby.
  126. ([#9][xi9]) [[@nathansobo][nathansobo]]
  127. ## 0.10.2 (August 30, 2009)
  128. * RR properly proxies subjects with private methods ([#7][xi7])
  129. ## 0.10.1 (???)
  130. * Fixed issue with DoubleInjection not invoking methods that are lazily created
  131. ([#4][xi4])
  132. * Fixed issue with mock.proxy and returns ([#2][xi2])
  133. ## 0.10.0 (June 1, 2009)
  134. * Method is no longer invoked if respond_to? returns false. This was in place to
  135. support ActiveRecord association proxies, and is no longer needed.
  136. ## 0.9.0 (April 25, 2009)
  137. * instance_of Doubles now apply to methods invoked in the subject's #initialize
  138. method.
  139. ## 0.8.1 (March 29, 2009)
  140. * Fixed exception where the Subject uses method delegation via method_missing
  141. (e.g. certain ActiveRecord AssociationProxy methods)
  142. ## 0.8.0 (March 29, 2009)
  143. * Fixed compatibility issues with Ruby 1.9
  144. * Aliased any_number_of_times with any_times
  145. * Better error messages for have_received and assert_received matchers
  146. [[@jferris][jferris]]
  147. * Better documentation on RR wilcard matchers [[@phildarnowsky][phildarnowsky]]
  148. ## 0.7.1 (January 16, 2009)
  149. * Performance improvements
  150. ## 0.7.0 (December 14, 2008)
  151. * Added spies [[@jferris][jferris], [@niessner][niessner],
  152. [@mmangino][mmangino]]
  153. * Added strongly typed reimplementation doubles [[@niessner][niessner]]
  154. ## 0.6.2 (???)
  155. * Fixed DoubleDefinition chaining edge cases
  156. ## 0.6.1 (???)
  157. * DoubleDefinitionCreatorProxy definition eval block is instance_evaled when the
  158. arity is not 1. When the arity is 1, the block is yielded with the
  159. DoubleDefinitionCreatorProxy passed in.
  160. ## 0.6.0 (October 13, 2008)
  161. * Friendlier DoubleNotFound error message
  162. * Implemented Double strategy creation methods (#mock, #stub, #proxy,
  163. #instance_of, and ! equivalents) on DoubleDefinition
  164. * Implemented hash_including matcher [Matthew O'Connor]
  165. * Implemented satisfy matcher [Matthew O'Connor]
  166. * Implemented DoubleDefinitionCreator#mock!, #stub!, and #dont_allow!
  167. * Modified api to method chain Doubles
  168. * Fix conflict with Mocha overriding Object#verify
  169. ## 0.5.0 (???)
  170. * Method chaining Doubles [[@nkallen][nkallen]]
  171. * Chained ordered expectations [[@nkallen][nkallen]]
  172. * Space#verify_doubles can take one or more objects with DoubleInjections to be
  173. verified
  174. ## 0.4.10 (July 6, 2008)
  175. * DoubleDefinitionCreatorProxy does not undef #object_id
  176. * Fixed rdoc pointer to README
  177. ## 0.4.9 (June 18, 2008)
  178. * Proxying from RR module to RR::Space.instance
  179. ## 0.4.8 (January 23, 2008)
  180. * Fixed issue with Hash arguments
  181. ## 0.4.7 (January 23, 2008)
  182. * Improved error message
  183. ## 0.4.6 (January 23, 2008)
  184. * Added Double#verbose and Double#verbose?
  185. ## 0.4.5 (January 15, 2008)
  186. * Fixed doubles for == and #eql? methods
  187. ## 0.4.4 (January 15, 2008)
  188. * Doc improvements
  189. * Methods that are not alphabetic, such as ==, can be doubles
  190. ## 0.4.3 (January 7, 2008)
  191. * Doc improvements
  192. * Cleanup
  193. * Finished renaming scenario to double
  194. ## 0.4.2 (December 31, 2007)
  195. * Renamed DoubleInsertion to DoubleInjection to be consistent with Mocha
  196. terminology
  197. ## 0.4.1 (December 31, 2007)
  198. * Fixed backward compatability issues with rspec
  199. * Renamed Space#verify_double_insertions to #verify_doubles
  200. ## 0.4.0 (December 30, 2007)
  201. * Documentation improvements
  202. * Renamed Double to DoubleInsertion
  203. * Renamed Scenario to Double
  204. ## 0.3.11 (September 6, 2007)
  205. * Fixed [#13724] Mock Proxy on Active Record Association proxies causes error
  206. ## 0.3.10 (August 18, 2007)
  207. * Fixed [#13139] Blocks added to proxy sets the return_value and not the
  208. after_call callback
  209. ## 0.3.9 (August 14, 2007)
  210. * Alias probe to proxy
  211. ## 0.3.8 (August 12, 2007)
  212. * Implemented [#13009] Better error mesage from TimesCalledMatcher
  213. ## 0.3.7 (August 9, 2007)
  214. * Fixed [#12928] Reset doubles fails on Rails association proxies
  215. ## 0.3.6 (August 1, 2007)
  216. * Fixed [#12765] Issues with ObjectSpace._id2ref
  217. ## 0.3.5 (July 29, 2007)
  218. * trim_backtrace is only set for Test::Unit
  219. ## 0.3.4 (July 22, 2007)
  220. * Implemented instance_of
  221. ## 0.3.3 (July 22, 2007)
  222. * Fixed [#12495] Error Probing method_missing interaction
  223. ## 0.3.2 (July 22, 2007)
  224. * Fixed [#12486] ScenarioMethodProxy when Kernel passed into instance methods
  225. ## 0.3.1 (July 22, 2007)
  226. * Automatically require Test::Unit and Rspec adapters
  227. ## 0.3.0 (July 22, 2007)
  228. * ScenarioCreator strategy method chaining
  229. * Removed mock_probe
  230. * Removed stub_probe
  231. ## 0.2.5 (July 21, 2007)
  232. * mock takes method_name argument
  233. * stub takes method_name argument
  234. * mock_probe takes method_name argument
  235. * stub_probe takes method_name argument
  236. * probe takes method_name argument
  237. * dont_allow takes method_name argument
  238. * do_not_allow takes method_name argument
  239. ## 0.2.4 (July 19, 2007)
  240. * Space#doubles key is now the object id
  241. * Fixed [#12402] Stubbing return value of probes fails after calling the stubbed
  242. method two times
  243. ## 0.2.3 (July 18, 2007)
  244. * Added RRMethods#rr_verify and RRMethods#rr_reset
  245. ## 0.2.2 (July 17, 2007)
  246. * Fixed "singleton method bound for a different object"
  247. * Doing Method aliasing again to store original method
  248. ## 0.2.1 (July 17, 2007)
  249. * Added mock_probe
  250. * Added stub_probe
  251. * Probe returns the return value of the passed in block, instead of ignoring its
  252. return value
  253. * Scenario#after_call returns the return value of the passed in block
  254. * Not using method aliasing to store original method
  255. * Renamed DoubleMethods to RRMethods
  256. * Added RRMethods#mock_probe
  257. ## 0.1.15 (July 17, 2007)
  258. * Fixed [#12333] Rebinding original_methods causes blocks not to work
  259. ## 0.1.14 (July 16, 2007)
  260. * Introduced concept of Terminal and NonTerminal TimesCalledMatchers
  261. * Doubles that can be called many times can be replaced
  262. * Terminal Scenarios are called before NonTerminal Scenarios
  263. * Error message tweaking
  264. * Raise error when making a Scenarios with NonTerminal TimesMatcher Ordered
  265. ## 0.1.13 (July 14, 2007)
  266. * Fixed [#12290] Scenario#returns with false causes a return value of nil
  267. ## 0.1.12 (July 14, 2007)
  268. * Fixed bug where Creators methods are not removed when methods are defined on
  269. Object
  270. * Fixed [#12289] Creators methods are not removed in Rails environment
  271. ## 0.1.11 (July 14, 2007)
  272. * Fixed [#12287] AtLeastMatcher does not cause Scenario to be called
  273. ## 0.1.10 (July 14, 2007)
  274. * Fixed [#12286] AnyArgumentExpectation#expected_arguments not implemented
  275. ## 0.1.9 (July 14, 2007)
  276. * Added DoubleMethods#any_times
  277. * Added Scenario#any_number_of_times
  278. ## 0.1.8 (July 14, 2007)
  279. * TimesCalledError Message Formatted to be on multiple lines
  280. * ScenarioNotFoundError Message includes all Scenarios for the Double
  281. * ScenarioOrderError shows list of remaining ordered scenarios
  282. ## 0.1.7 (July 14, 2007)
  283. * Fixed [#12194] Double#reset_doubles are not clearing Ordered Scenarios bug
  284. * Added Space#reset
  285. * Space#reset_doubles and Space#reset_ordered_scenarios is now protected
  286. * Added Scenario#at_least
  287. * Added Scenario#at_most
  288. ## 0.1.6 (July 10, 2007)
  289. * [#12120] probe allows a the return value to be intercepted
  290. ## 0.1.5 (July 9, 2007)
  291. * TimesCalledExpectation says how many times were called and how many times
  292. called were expected on error
  293. ## 0.1.4 (July 9, 2007)
  294. * TimesCalledError prints the backtrace to where the Scenario was defined when
  295. being verified
  296. * Error message includes method name when Scenario is not found
  297. ## 0.1.3 (July 9, 2007)
  298. * Fixed issue where Double#placeholder_name issues when Double method name has a
  299. ! or ?
  300. ## 0.1.2 (July 8, 2007)
  301. * Scenario#returns also accepts an argument
  302. * Implemented Scenario#yields
  303. ## 0.1.1 (July 8, 2007)
  304. * Trim the backtrace for Rspec and Test::Unit
  305. * Rspec and Test::Unit integration fixes
  306. ## 0.1.0 (July 7, 2007)
  307. * Initial Release
  308. [btakita-rr]: http://github.com/btakita/rr
  309. [rr-rr]: http://github.com/rr/rr
  310. [i2]: http://github.com/rr/rr/issues/2
  311. [i3]: http://github.com/rr/rr/issues/3
  312. [Thibaut]: http://github.com/Thibaut
  313. [i4]: http://github.com/rr/rr/issues/4
  314. [xi66]: http://github.com/btakita/rr/issues/66
  315. [xi68]: http://github.com/btakita/rr/issues/68
  316. [xi80]: http://github.com/btakita/rr/issues/80
  317. [njay]: http://github.com/njay
  318. [james2m]: http://github.com/james2m
  319. [xi44]: http://github.com/btakita/rr/issues/44
  320. [xi69]: http://github.com/btakita/rr/issues/69
  321. [jayferd]: http://github.com/jayferd
  322. [autohook]: https://github.com/rr/rr/blob/master/lib/rr/autohook.rb
  323. [evanphx]: http://github.com/evanphx
  324. [xi63]: http://github.com/btakita/rr/issues/63
  325. [xi63]: http://github.com/btakita/rr/issues/62
  326. [cespare]: http://github.com/cespare
  327. [gavingmiller]: http://github.com/gavingmiller
  328. [bonkydog]: http://github.com/bonkydog
  329. [xi42]: http://github.com/btakita/rr/issues/42
  330. [libc]: http://github.com/libc
  331. [brynary]: http://github.com/brynary
  332. [xi9]: http://github.com/btakita/rr/issues/9
  333. [nathansobo]: http://github.com/nathansobo
  334. [xi7]: http://github.com/btakita/rr/issues/7
  335. [xi4]: http://github.com/btakita/rr/issues/4
  336. [xi2]: http://github.com/btakita/rr/issues/2
  337. [nkallen]: http://github.com/nkallen
  338. [jferris]: http://github.com/jferris
  339. [phildarnowsky]: http://github.com/phildarnowsky
  340. [niessner]: http://github.com/niessner
  341. [mmangino]: http://github.com/mmangino
  342. [xi20]: http://github.com/btakita/rr/issues/20
  343. [xi24]: http://github.com/btakita/rr/issues/24
  344. [xi16]: http://github.com/btakita/rr/issues/16
  345. [xi62]: http://github.com/btakita/rr/issues/62
  346. [xi57]: http://github.com/btakita/rr/issues/57
  347. [xi60]: http://github.com/btakita/rr/issues/60
  348. [i26]: http://github.com/rr/rr/issues/26
  349. [i29]: http://github.com/rr/rr/issues/29
  350. [i27]: http://github.com/rr/rr/issues/27
  351. [i34]: http://github.com/rr/rr/issues/34
  352. [i32]: http://github.com/rr/rr/issues/32
  353. [i37]: http://github.com/rr/rr/issues/37