RSpec / RSpec Core / Docs
2.14.8 / 2014-02-27
2.14.8 / 2014-02-27
Bug fixes:
- Fix regression with the
TextMateFormatterthat prevented backtrace links from being clickable. (Stefan Daschek)
2.14.7 / 2013-10-29
Bug fixes:
- Fix regression in 2.14.6 that broke the Fivemat formatter. It depended upon either
example.execution_result[:exception].pending_fixed?(which was removed in 2.14.6 to fix an issue with frozen error objects) orRSpec::Core::PendingExampleFixedError(which was renamed toRSpec::Core::Pending::PendingExampleFixedErrorin 2.8. This fix makes a constant alias for the old error name. (Myron Marston)
2.14.6 / 2013-10-15
Bug fixes:
- Format stringified numbers correctly when mathn library is loaded. (Jay Hayes)
- Fix an issue that prevented the use of frozen error objects. (Lars Gierth)
2.14.5 / 2013-08-13
Bug fixes:
- Fix a
NoMethodErrorthat was being raised when there were no shared examples or contexts declared andRSpec.world.resetis invoked. (thepoho, Jon Rowe, Myron Marston) - Fix a deprecation warning that was being incorrectly displayed when
shared_examplesare declared at top level in amodulescope. (Jon Rowe) - Fix after(:all) hooks so consecutive (same context) scopes will run even if one raises an error. (Jon Rowe, Trejkaz)
- JsonFormatter no longer dies if
dump_profileisn't defined (Alex / @MasterLambaster, Jon Rowe)
2.14.4 / 2013-07-21
Bug fixes
- Fix regression in 2.14: ensure configured requires (via
-roption) are loaded before spec files are loaded. This allows the spec files to programatically change the file pattern (Jon Rowe). - Autoload
RSpec::MocksandRSpec::Expectationswhen referenced if they are not already loaded (RSpec::Matcheshas been autoloaded for a while). In therspecgem, we changed it recently to stop loadingrspec/mocksandrspec/expectationsby default, as some users reported problems where they were intending to use mocha, not rspec-mocks, but rspec-mocks was loaded and causing a conflict. rspec-core loads mocks and expectations at the appropriate time, so it seemed like a safe change -- but caused a problem for some authors of libraries that integrate with RSpec. This fixes that problem. (Myron Marston) - Gracefully handle a command like
rspec --profile path/to/spec.rb: thepath/to/spec.rbarg was being wrongly treated as theprofileinteger arg, which got cast0usingto_i, causing no profiled examples to be printed. (Jon Rowe)
2.14.3 / 2013-07-13
Bug fixes
- Fix deprecation notices issued from
RSpec::Core::RakeTaskso that they work properly when all of rspec-core is not loaded. (This was a regression in 2.14) (Jon Rowe)
2.14.2 / 2013-07-09
Bug fixes
- Fix regression caused by 2.14.1 release: formatters that report that they
respond_to?a notification, but had no corresponding method would raise an error when registered. The new fix is to just implementstarton the deprecation formatter to fix the original JRuby/ruby-debug issue. (Jon Rowe)
2.14.1 / 2013-07-08
Bug fixes
- Address deprecation formatter failure when using
ruby-debugon JRuby: fixRSpec::Core::Reporterto not send a notification when the formatter's implementation of the notification method comes fromKernel(Alex Portnov, Jon Rowe).
2.14.0 / 2013-07-06
Enhancements
- Apply focus to examples defined with
fit(equivalent ofit "description", focus: true) (Michael de Silva)
Bug fixes
- Ensure methods defined by
lettake precedence over others when there is a name collision (e.g. from an included module). (Jon Rowe, Andy Lindeman and Myron Marston)
2.14.0.rc1 / 2013-05-27
Enhancements
- Improved Windows detection inside Git Bash, for better
--colorhandling. - Add profiling of the slowest example groups to
--profileoption. The output is sorted by the slowest average example groups. - Don't show slow examples if there's a failure and both
--fail-fastand--profileoptions are used (Paweł Gościcki). - Rather than always adding
specto the load path, add the configured--default-pathto the load path (which defaults tospec). This better supports folks who choose to put their specs in a different directory (John Feminella). - Add some logic to test time duration precision. Make it a function of time, dropping precision as the time increases. (Aaron Kromer)
- Add new
backtrace_inclusion_patternsconfig option. Backtrace lines that match one of these patterns will always be included in the backtrace, even if they match an exclusion pattern, too (Sam Phippen). - Support ERB trim mode using the
-when parsing.rspecas ERB (Gabor Garami). - Give a better error message when let and subject are called without a block. (Sam Phippen).
- List the precedence of
.rspec-localin the configuration documentation (Sam Phippen) - Support
{a,b}shell expansion syntax in--patternoption (Konstantin Haase). - Add cucumber documentation for --require command line option (Bradley Schaefer)
- Expose configruation options via config:
config.libsreturns the libs configured to be added onto the load pathfull_backtrace?returns the state of the backtrace cleanerdebug?returns true when the debugger is loadedline_numbersreturns the line numbers we are filtering by (if any)full_descriptionreturns the RegExp used to filter descriptions (Jon Rowe)
- Add setters for RSpec.world and RSpec.configuration (Alex Soulim)
- Configure ruby's warning behaviour with
--warnings(Jon Rowe) - Fix an obscure issue on old versions of
1.8.7whereTime.dupwouldn't allow access toTime.now(Jon Rowe) - Make
shared_examples_forcontext aware, so that keys may be safely reused in multiple contexts without colliding. (Jon Rowe) - Add a configurable
deprecation_stream(Jon Rowe) - Publish deprecations through a formatter (David Chelimsky)
Bug fixes
- Make JSON formatter behave the same when it comes to
--profileas the text formatter (Paweł Gościcki). - Fix named subjects so that if an inner group defines a method that overrides the named method,
subjectstill retains the originally declared value (Myron Marston). - Fix random ordering so that it does not cause
randin examples in nested sibling contexts to return the same value (Max Shytikov). - Use the new
backtrace_inclusion_patternsconfig option to ensure that folks who develop code in a directory matching one of the default exclusion patterns (e.g.gems) still get the normal backtrace filtering (Sam Phippen). - Fix ordering of
beforehooks so thatbeforehooks declared inRSpec.configurerun beforebeforehooks declared in a shared context (Michi Huber and Tejas Dinkar). - Fix
Example#full_descriptionso that it gets filled in by the last matcher description (asExample#descriptionalready did) when no doc string has been provided (David Chelimsky). - Fix the memoized methods (
letandsubject) leakingdefine_methodas apublicmethod. (Thomas Holmes and Jon Rowe) (#873) - Fix warnings coming from the test suite. (Pete Higgins)
Deprecations
- Deprecate
Configuration#backtrace_clean_patternsin favor ofConfiguration#backtrace_exclusion_patternsfor greater consistency and symmetry with newbacktrace_inclusion_patternsconfig option (Sam Phippen). - Deprecate
Configuration#requires=in favor of using ruby'srequire. Requires specified by the command line can still be accessed by theConfiguration#requirereader. (Bradley Schaefer) - Deprecate calling
SharedExampleGroupsdefined across sibling contexts (Jon Rowe)
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