rspec-core

RSpec runner and formatters

MIT License

Downloads
925.1M
Stars
1.2K
Committers
367

Bot releases are hidden (Show)

rspec-core - 2.14.8 Latest Release

Published by myronmarston over 10 years ago

2.14.8 / 2014-02-27

Full Changelog

Bug fixes:

  • Fix regression with the TextMateFormatter that prevented backtrace links
    from being clickable. (Stefan Daschek)
rspec-core - 2.99.0.beta2

Published by myronmarston over 10 years ago

2.99.0.beta2 / 2014-02-17

full changelog

Enhancements:

  • Add is_expected for one-liners that read well with the
    expect-based syntax. is_expected is simply defined as
    expect(subject) and can be used in an expression like:
    it { is_expected.to read_well }. (Myron Marston)
  • Backport skip from RSpec 3, which acts like pending did in RSpec 2
    when not given a block, since the behavior of pending is changing in
    RSpec 3. (Xavier Shay)

Deprecations:

  • Deprecate inexact mock_with config options. RSpec 3 will only support
    the exact symbols :rspec, :mocha, :flexmock, :rr or :nothing
    (or any module that implements the adapter interface). RSpec 2 did
    fuzzy matching but this will not be supported going forward.
    (Myron Marston)
  • Deprecate show_failures_in_pending_blocks config option. To achieve
    the same behavior as the option enabled, you can use a custom
    formatter instead. (Xavier Shay)
  • Add a deprecation warning for the fact that the behavior of pending
    is changing in RSpec 3 -- rather than skipping the example (as it did
    in 2.x when no block was provided), it will run the example and mark
    it as failed if no exception is raised. Use skip instead to preserve
    the old behavior. (Xavier Shay)
  • Deprecate 's', 'n', 'spec' and 'nested' as aliases for documentation
    formatter. (Jon Rowe)
  • Deprecate RSpec::Core::Reporter#abort in favor of
    RSpec::Core::Reporter#finish. (Jon Rowe)

Bug Fixes:

  • Fix failure (undefined method path) in end-of-run summary
    when raise_errors_for_deprecations! is configured. (Myron Marston)
  • Fix issue were overridding spec ordering from the command line wasn't
    fully recognised interally. (Jon Rowe)
rspec-core - 3.0.0.beta2

Published by myronmarston over 10 years ago

3.0.0.beta2 / 2014-02-17

full changelog

Breaking Changes for 3.0.0:

  • Make mock_with option more strict. Strings are no longer supported
    (e.g. mock_with "mocha") -- use a symbol instead. Also, unrecognized
    values will now result in an error rather than falling back to the
    null mocking adapter. If you want to use the null mocking adapter,
    use mock_with :nothing (as has been documented for a long time).
    (Myron Marston)
  • Remove support for overriding RSpec's built-in :if and :unless
    filters. (Ashish Dixit)
  • Custom formatters are now required to call
    RSpec::Core::Formatters.register(formatter_class, *notifications)
    where notifications is the list of events the formatter wishes to
    be notified about. Notifications are handled by methods matching the
    names on formatters. This allows us to add or remove notifications
    without breaking existing formatters. (Jon Rowe)
  • Change arguments passed to formatters. Rather than passing multiple
    arguments (which limits are ability to add additional arguments as
    doing so would break existing formatters), we now pass a notification
    value object that exposes the same data via attributes. This will
    allow us to add new bits of data to a notification event without
    breaking existing formattesr. (Jon Rowe)
  • Remove support for deprecated :alias option for
    RSpec.configuration.add_setting. (Myron Marston)
  • Remove support for deprecated RSpec.configuration.requires = [...].
    (Myron Marston)
  • Remove support for deprecated --formatter CLI option. (Myron Marston)
  • Remove support for deprecated --configure CLI option. (Myron Marston)
  • Remove support for deprecated RSpec::Core::RakeTask#spec_opts=.
    (Myron Marston)
  • An example group level pending block or :pending metadata now executes
    the example and cause a failure if it passes, otherwise it will be pending if
    it fails. The old "never run" behaviour is still used for xexample, xit,
    and xspecify, or via a new skip method or :skip metadata option.
    (Xavier Shay)
  • After calling pending inside an example, the remainder of the example will
    now be run. If it passes a failure is raised, otherwise the example is marked
    pending. The old "never run" behaviour is provided a by a new skip method.
    (Xavier Shay)
  • Pending blocks inside an example have been removed as a feature with no
    direct replacement. Use skip or pending without a block. (Xavier Shay)
  • Pending statement is no longer allowed in before(:all) hooks. Use skip
    instead. (Xavier Shay)
  • Remove show_failures_in_pending_blocks configuration option. (Xavier Shay)
  • Remove support for specifying the documentation formatter using
    's', 'n', 'spec' or 'nested'. (Jon Rowe)

Enhancements:

  • Add is_expected for one-liners that read well with the
    expect-based syntax. is_expected is simply defined as
    expect(subject) and can be used in an expression like:
    it { is_expected.to read_well }. (Myron Marston)
  • Add example run time to JSON formatter output. (Karthik Kastury)
  • Add more suggested settings to the files generated by
    rspec --init. (Myron Marston)
  • Add config.alias_example_group_to, which can be used to define a
    new method that defines an example group with the provided metadata.
    (Michi Huber)
  • Add xdescribe and xcontext as shortcuts to make an example group
    pending. (Myron Marston)
  • Add fdescribe and fcontext as shortcuts to focus an example group.
    (Myron Marston)
  • Don't autorun specs via #at_exit by default. require 'rspec/autorun'
    is only needed when running specs via ruby, as it always has been.
    Running specs via rake or rspec are both unaffected. (Ben Hoskings)
  • Add expose_dsl_globally config option, defaulting to true. When disabled
    it will remove the monkey patches rspec-core adds to main and Module
    (e.g. describe, shared_examples_for, etc). (Jon Rowe)
  • Expose RSpec DSL entry point methods (describe,
    shared_examples_for, etc) on the RSpec constant. Intended for use
    when expose_dsl_globally is set to false. (Jon Rowe)
  • For consistency, expose all example group aliases (including
    context) on the RSpec constant. If expose_dsl_globally is set to
    true, also expose them on main and Module. Historically, only describe
    was exposed. (Jon Rowe, Michi Huber)

Bug Fixes:

  • Fix failure (undefined method path) in end-of-run summary
    when raise_errors_for_deprecations! is configured. (Myron Marston)
  • Issue error when attempting to use -i or --I on command line,
    too close to -I to be considered short hand for --init. (Jon Rowe)
  • Prevent adding formatters to an output target if the same
    formatter has already been added to that output. (Alex Peattie)
  • Allow a matcher-generated example description to be used when
    the example is pending. (Myron Marston)
  • Ensure the configured failure_exit_code is used by the rake
    task when there is a failure. (Jon Rowe)
  • Restore behaviour whereby system exclusion filters take priority over working
    directory (was broken in beta1). (Jon Rowe)
  • Prevent RSpec mangling file names that have substrings containing line_number
    or default_path. (Matijs van Zuijlen)
rspec-core - 3.0.0.beta1

Published by myronmarston almost 11 years ago

3.0.0.beta1 / 2013-11-07

full changelog

Breaking Changes for 3.0.0:

  • Remove explicit support for 1.8.6. (Jon Rowe)
  • Remove RSpec::Core::ExampleGroup#example and
    RSpec::Core::ExampleGroup#running_example methods. If you need
    access to the example (e.g. to get its metadata), use a block arg
    instead. (David Chelimsky)
  • Remove TextMateFormatter, it has been moved to rspec-tmbundle.
    (Aaron Kromer)
  • Remove RCov integration. (Jon Rowe)
  • Remove deprecated support for RSpec 1 constructs (Myron Marston):
    • The Spec and Rspec constants (rather than RSpec).
    • Spec::Runner.configure rather than RSpec.configure.
    • Rake::SpecTask rather than RSpec::Core::RakeTask.
  • Remove deprecated support for share_as. (Myron Marston)
  • Remove --debug option (and corresponding option on
    RSpec::Core::Configuration). Instead, use -r<debugger gem name> to
    load whichever debugger gem you wish to use (e.g. ruby-debug,
    debugger, or pry). (Myron Marston)
  • Extract Autotest support to a seperate gem. (Jon Rowe)
  • Raise an error when a let or subject declaration is
    accessed in a before(:all) or after(:all) hook. (Myron Marston)
  • Extract its support to a separate gem. (Peter Alfvin)
  • Disallow use of a shared example group from sibling contexts, making them
    fully isolated. 2.14 and 2.99 allowed this but printed a deprecation warning.
    (Jon Rowe)
  • Remove RSpec::Core::Configuration#output and
    RSpec::Core::Configuration#out aliases of
    RSpec::Core::Configuration#output_stream. (Myron Marston)

Enhancements

  • Replace unmaintained syntax gem with coderay gem. (Xavier Shay)
  • Times in profile output are now bold instead of failure_color.
    (Matthew Boedicker)
  • Add --no-fail-fast command line option. (Gonzalo Rodríguez-Baltanás Díaz)
  • Runner now considers the local system ip address when running under Drb.
    (Adrian CB)
  • JsonFormatter now includes --profile information. (Alex / @MasterLambaster)
  • Always treat symbols passed as metadata args as hash
    keys with true values. RSpec 2 supported this with the
    treat_symbols_as_metadata_keys_with_true_values but
    now this behavior is always enabled. (Myron Marston)
  • Add --dry-run option, which prints the formatter output
    of your suite without running any examples or hooks.
    (Thomas Stratmann, Myron Marston)
  • Document the configuration options and default values in the spec_helper.rb
    file that is generated by RSpec. (Parker Selbert)
  • Give generated example group classes a friendly name derived
    from the docstring, rather than something like "Nested_2".
    (Myron Marston)
  • Avoid affecting randomization of user code when shuffling
    examples so that users can count on their own seeds
    working. (Travis Herrick)

Deprecations

  • treat_symbols_as_metadata_keys_with_true_values is deprecated and no
    longer has an affect now that the behavior it enabled is always
    enabled. (Myron Marston)
rspec-core - 2.99.0.beta1

Published by myronmarston almost 11 years ago

2.99.0.beta1 / 2013-11-07

full changelog

Enhancements

  • Block-based DSL methods that run in the context of an example
    (it, before(:each), after(:each), let and subject)
    now yield the example as a block argument. (David Chelimsky)
  • Warn when the name of more than one example group is submitted to
    include_examples and it's aliases. (David Chelimsky)
  • Add expose_current_running_example_as config option for
    use during the upgrade process when external gems use the
    deprecated RSpec::Core::ExampleGroup#example and
    RSpec::Core::ExampleGroup#running_example methods. (Myron Marston)
  • Limit spamminess of deprecation messages. (Bradley Schaefer, Loren Segal)
  • Add config.raise_errors_for_deprecations! option, which turns
    deprecations warnings into errors to surface the full backtrace
    of the call site. (Myron Marston)

Deprecations

  • Deprecate RSpec::Core::ExampleGroup#example and
    RSpec::Core::ExampleGroup#running_example methods. If you need
    access to the example (e.g. to get its metadata), use a block argument
    instead. (David Chelimsky)
  • Deprecate use of autotest/rspec2 in favour of rspec-autotest. (Jon Rowe)
  • Deprecate RSpec's built-in debugger support. Use a CLI option like
    -rruby-debug (for the ruby-debug gem) or -rdebugger (for the
    debugger gem) instead. (Myron Marston)
  • Deprecate RSpec.configuration.treat_symbols_as_metadata_keys_with_true_values = false.
    RSpec 3 will not support having this option set to false. (Myron Marston)
  • Deprecate accessing a let or subject declaration in
    a after(:all) hook. (Myron Marston, Jon Rowe)
  • Deprecate built-in its usage in favor of rspec-its gem due to planned
    removal in RSpec 3. (Peter Alfvin)
  • Deprecate RSpec::Core::PendingExampleFixedError in favor of
    RSpec::Core::Pending::PendingExampleFixedError. (Myron Marston)
  • Deprecate RSpec::Core::Configuration#out and
    RSpec::Core::Configuration#output in favor of
    RSpec::Core::Configuration#output_stream. (Myron Marston)
  • Deprecate legacy ordering APIs.
    • You should use register_ordering(:global) instead of these:
      • RSpec::Core::Configuration#order_examples
      • RSpec::Core::Configuration#order_groups
      • RSpec::Core::Configuration#order_groups_and_examples
    • These are deprecated with no replacement because in RSpec 3
      ordering is a property of individual example groups rather than
      just a global property of the entire test suite:
      • RSpec::Core::Configuration#order
      • RSpec::Core::Configuration#randomize?
    • --order default is deprecated in favor of --order defined
      (Myron Marston)
rspec-core - 2.14.7

Published by myronmarston almost 11 years ago

2.14.7 / 2013-10-29

full changelog

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)
    or RSpec::Core::PendingExampleFixedError (which was renamed
    to RSpec::Core::Pending::PendingExampleFixedError in 2.8.
    This fix makes a constant alias for the old error name.
    (Myron Marston)
rspec-core - 2.14.6

Published by myronmarston about 11 years ago

2.14.6 / 2013-10-15

full changelog

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)
rspec-core - 2.14.5

Published by myronmarston about 11 years ago

2.14.5 / 2013-08-13

full changelog

Bug fixes:

  • Fix a NoMethodError that was being raised when there were no shared
    examples or contexts declared and RSpec.world.reset is invoked.
    (thepoho, Jon Rowe, Myron Marston)
  • Fix a deprecation warning that was being incorrectly displayed when
    shared_examples are declared at top level in a module scope.
    (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_profile isn't defined (Alex / @MasterLambaster, Jon Rowe)
rspec-core - 2.14.4

Published by myronmarston about 11 years ago

2.14.4 / 2013-07-21

full changelog

Bug fixes

  • Fix regression in 2.14: ensure configured requires (via -r option)
    are loaded before spec files are loaded. This allows the spec files
    to programatically change the file pattern (Jon Rowe).
  • Autoload RSpec::Mocks and RSpec::Expectations when referenced if
    they are not already loaded (RSpec::Matches has been autoloaded
    for a while). In the rspec gem, we changed it recently to stop
    loading rspec/mocks and rspec/expectations by 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:
    the path/to/spec.rb arg was being wrongly treated as the profile
    integer arg, which got cast 0 using to_i, causing no profiled
    examples to be printed. (Jon Rowe)
rspec-core - 2.14.3

Published by myronmarston over 11 years ago

2.14.3 / 2013-07-13

full changelog

Bug fixes

  • Fix deprecation notices issued from RSpec::Core::RakeTask so
    that they work properly when all of rspec-core is not loaded.
    (This was a regression in 2.14) (Jon Rowe)
rspec-core - 2.14.2

Published by myronmarston over 11 years ago

2.14.2 / 2013-07-09

full changelog

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 implement start on the deprecation
    formatter to fix the original JRuby/ruby-debug issue.
    (Jon Rowe)
rspec-core -

Published by myronmarston over 11 years ago

2.14.1 / 2013-07-08

full changelog

Bug fixes

  • Implement #start on the Deprecation Formatter to prevent collision with
    ruby-debug on JRuby (Alex Portnov, Jon Rowe)
rspec-core - 2.14.0

Published by myronmarston over 11 years ago

2.14.0 / 2013-07-06

full changelog

Enhancements

  • Apply focus to examples defined with fit (equivalent of
    it "description", focus: true) (Michael de Silva)

Bug fix

  • Ensure methods defined by let take 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

full changelog

Enhancements

  • Improved Windows detection inside Git Bash, for better --color handling.
  • Add profiling of the slowest example groups to --profile option.
    The output is sorted by the slowest average example groups.
  • Don't show slow examples if there's a failure and both --fail-fast
    and --profile options are used (Paweł Gościcki).
  • Rather than always adding spec to the load path, add the configured
    --default-path to the load path (which defaults to spec). 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_patterns config 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 .rspec as ERB
    (Gabor Garami).
  • Give a better error message when let and subject are called without a block.
    (Sam Phippen).
  • List the precedence of .rspec-local in the configuration documentation
    (Sam Phippen)
  • Support {a,b} shell expansion syntax in --pattern option
    (Konstantin Haase).
  • Add cucumber documentation for --require command line option
    (Bradley Schaefer)
  • Expose configruation options via config:
    • config.libs returns the libs configured to be added onto the load path
    • full_backtrace? returns the state of the backtrace cleaner
    • debug? returns true when the debugger is loaded
    • line_numbers returns the line numbers we are filtering by (if any)
    • full_description returns 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.7 where Time.dup wouldn't
    allow access to Time.now (Jon Rowe)
  • Make shared_examples_for context 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 --profile as
    the text formatter (Paweł Gościcki).
  • Fix named subjects so that if an inner group defines a method that
    overrides the named method, subject still retains the originally
    declared value (Myron Marston).
  • Fix random ordering so that it does not cause rand in examples in
    nested sibling contexts to return the same value (Max Shytikov).
  • Use the new backtrace_inclusion_patterns config 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 before hooks so that before hooks declared in
    RSpec.configure run before before hooks declared in a shared
    context (Michi Huber and Tejas Dinkar).
  • Fix Example#full_description so that it gets filled in by the last
    matcher description (as Example#description already did) when no
    doc string has been provided (David Chelimsky).
  • Fix the memoized methods (let and subject) leaking define_method
    as a public method. (Thomas Holmes and Jon Rowe) (#873)
  • Fix warnings coming from the test suite. (Pete Higgins)

Deprecations

  • Deprecate Configuration#backtrace_clean_patterns in favor of
    Configuration#backtrace_exclusion_patterns for greater consistency
    and symmetry with new backtrace_inclusion_patterns config option
    (Sam Phippen).
  • Deprecate Configuration#requires= in favor of using ruby's
    require. Requires specified by the command line can still be
    accessed by the Configuration#require reader. (Bradley Schaefer)
  • Deprecate calling SharedExampleGroups defined across sibling contexts
    (Jon Rowe)