RSpec / RSpec Core / Docs
2.13.1 / 2013-03-12
2.13.1 / 2013-03-12
Bug fixes
- Use hook classes as proxies rather than extending hook blocks to support lambdas for before/after/around hooks. (David Chelimsky)
- Fix regression in 2.13.0 that caused confusing behavior when overriding a named subject with an unnamed subject in an inner group and then referencing the outer group subject's name. The fix for this required us to disallow using
superin a named subject (which is confusing, anyway -- named subjects create 2 methods, so which method on the parent example group are yousupering to?) butsuperin an unnamed subject continues to work (Myron Marston). - Do not allow a referenced
letorsubjectinbefore(:all)to cause otherletdeclarations to leak across examples (Myron Marston). - Work around odd ruby 1.9 bug with
String#matchthat was triggered by passing it a regex from aletdeclaration. For more info, see http://bugs.ruby-lang.org/issues/8059 (Aaron Kromer). - Add missing
require 'set'tobase_text_formatter.rb(Tom Anderson).
Deprecations
- Deprecate accessing
letorsubjectdeclarations inbefore(:all). These were not intended to be called in abefore(:all)hook, as they exist to define state that is reset between each example, whilebefore(:all)exists to define state that is shared across examples in an example group (Myron Marston).
2.13.0 / 2013-02-23
Enhancements
- Allow
--profileoption to take a count argument that determines the number of slow examples to dump (Greggory Rothmeier). - Add
subject!that is the analog tolet!. It defines an explicit subject and sets abeforehook that will invoke the subject (Zubin Henner). - Fix
letandsubjectdeclaration so thatsuperandreturncan be used in them, just like in a normal method. (Myron Marston) - Allow output colors to be configured individually. (Charlie Maffitt)
- Always dump slow examples when
--profileoption is given, even when an example failed (Myron Marston).
Bug fixes
- Don't blow up when dumping error output for instances of anonymous error classes (Myron Marston).
- Fix default backtrace filters so lines from projects containing "gems" in the name are not filtered, but lines from installed gems still are (Myron Marston).
- Fix autotest command so that is uses double quotes rather than single quotes for windows compatibility (Jonas Tingeborn).
- Fix
itsso that uses ofsubjectin abeforeorletdeclaration in the parent group continue to reference the parent group's subject. (Olek Janiszewski)
2.12.2 / 2012-12-13
Bug fixes
- Fix
RSpec::Core::RakeTaskso that it is compatible with rake 0.8.7 on ruby 1.8.7. We had accidentally broke it in the 2.12 release (Myron Marston). - Fix
RSpec::Core::RakeTaskso it is tolerant of theRspecconstant for backwards compatibility (Patrick Van Stee)
2.12.1 / 2012-12-01
Bug fixes
- Specs are run even if another at\_exit hook calls
exit. This allows Test::Unit and RSpec to run together. (Suraj N. Kurapati) - Fix full doc string concatenation so that it handles the case of a method string (e.g. "#foo") being nested under a context string (e.g. "when it is tuesday"), so that we get "when it is tuesday #foo" rather than "when it is tuesday#foo". (Myron Marston)
- Restore public API I unintentionally broke in 2.12.0:
RSpec::Core::Formatters::BaseFormatter#format_backtrce(backtrace, example)(Myron Marston).
2.12.0 / 2012-11-12
Enhancements
- Add support for custom ordering strategies for groups and examples. (Myron Marston)
- JSON Formatter (Alex Chaffee)
- Refactor rake task internals (Sam Phippen)
- Refactor HtmlFormatter (Pete Hodgson)
- Autotest supports a path to Ruby that contains spaces (dsisnero)
- Provide a helpful warning when a shared example group is redefined. (Mark Burns).
--default_pathcan be specified as--default-line.--line_numbercan be specified as--line-number. Hyphens are more idiomatic command line argument separators (Sam Phippen).- A more useful error message is shown when an invalid command line option is used (Jordi Polo).
- Add
format_docstrings { |str| }config option. It can be used to apply formatting rules to example group and example docstrings. (Alex Tan) - Add support for an
.rspec-localoptions file. This is intended to allow individual developers to set options in a git-ignored file that override the common project options in.rspec. (Sam Phippen) - Support for mocha 0.13.0. (Andy Lindeman)
Bug fixes
- Remove override of
ExampleGroup#ancestors. This is a core ruby method that RSpec shouldn't override. Instead, defineExampleGroup#parent_groups. (Myron Marston) - Limit monkey patching of shared example/context declaration methods (
shared_examples_for, etc.) to just the objects that need it rather than every object in the system (Myron Marston). - Fix Metadata#fetch to support computed values (Sam Goldman).
- Named subject can now be referred to from within subject block in a nested group (tomykaira).
- Fix
fail_fastso that it properly exits when an error occurs in abefore(:all) hook(Bradley Schaefer). - Make the order spec files are loaded consistent, regardless of the order of the files returned by the OS or the order passed at the command line (Jo Liss and Sam Phippen).
- Ensure instance variables from
before(:all)are always exposed fromafter(:all), even if an error occurs inbefore(:all)(Sam Phippen). rspec --initno longer generates an incorrect warning about--configurebeing deprecated (Sam Phippen).- Fix pluralization of
1 seconds(Odin Dutton) - Fix ANSICON url (Jarmo Pertman)
- Use dup of Time so reporting isn't clobbered by examples that modify Time without properly restoring it. (David Chelimsky)
Deprecations
share_asis no longer needed.shared_contextand/orRSpec::SharedContextprovide better mechanisms (Sam Phippen).- Deprecate
RSpec.configurationwith a block (useRSpec.configure).
2.11.1 / 2012-07-18
Bug fixes
- Fix the way we autoload RSpec::Matchers so that custom matchers can be defined before rspec-core has been configured to definitely use rspec-expectations. (Myron Marston)
- Fix typo in --help message printed for -e option. (Jo Liss)
- Fix ruby warnings. (Myron Marston)
- Ignore mock expectation failures when the example has already failed. Mock expectation failures have always been ignored in this situation, but due to my changes in 27059bf1 it was printing a confusing message. (Myron Marston).
2.11.0 / 2012-07-07
Enhancements