Permalink
Commits on Mar 16, 2017
  1. Merge pull request #2400 from rspec/fix-when_first_matching_example_d…

    …efined
    
    Fix bugs where config.when_first_matching_example_defined hooks would fire multiple times
    yujinakayama committed on GitHub Mar 16, 2017
  2. Fix bugs where when_first_matching_example_defined hooks would fire m…

    …ultiple times
    
    We need to properly unregister the hook from the original hook collection
    (@items_and_filters in FilterableItemRepository::QueryOptimized)
    rather than the memoized cache.
    yujinakayama committed Mar 15, 2017
Commits on Mar 15, 2017
  1. Add repro specs for when_first_matching_example_defined bugs

    The when_first_matching_example_defined hooks are registered on
    @derived_metadata_blocks, which is an instance of
    FilterableItemRepository::QueryOptimized, and unregistered on the first
    invocation, so that they won't run multiple times.
    
    https://github.com/rspec/rspec-core/blob/v3.5.4/lib/rspec/core/configuration.rb#L1724
    
    However, they are actually unregistered _only_ from the internal
    memoized cache for a particular metadata in
    FilterableItemRepository::QueryOptimized. As a result, the hooks would
    be invoked multiple times in the following cases:
    
    * When the memoized cache is not used.
      In particular, when the value of the hook's metadata is a Proc.
    * When the hooks are memoized in combination with another registered
      metadata before the first invocation.
    yujinakayama committed Mar 15, 2017
Commits on Mar 6, 2017
  1. mock_with -> expect_with [ci skip] (#2398)

    The `config.mock_with` block is right above. For configuring the expectation
    library's syntax, we must use `config.expect_with`.
    bquorning committed with JonRowe Mar 6, 2017
  2. Changelog for #2396

    [skip ci]
    JonRowe committed on GitHub Mar 6, 2017
  3. Cleanup after #2396

    JonRowe committed on GitHub Mar 6, 2017
  4. Add boundary check to prevent unexpected negative value (#2396)

    Added a group level boundary check to prevent unexpected negative values in group level in DocumentationFormatter
    VTJamie committed with JonRowe Mar 6, 2017
Commits on Mar 2, 2017
  1. Merge pull request #2392 from rspec/issue-2379-changelog

    Add changelog for #2368
    JonRowe committed on GitHub Mar 2, 2017
  2. Add changelog for #2368

    Xavier Shay committed Mar 2, 2017
Commits on Feb 26, 2017
  1. Changelog for #2387

    [skip ci]
    JonRowe committed on GitHub Feb 26, 2017
Commits on Feb 23, 2017
  1. Merge pull request #2387 from jenseng/fix-example-finished

    Ensure example_finished gets reported from context-hook failures
    JonRowe committed on GitHub Feb 23, 2017
Commits on Feb 21, 2017
  1. Correct changelog

    [skip ci]
    JonRowe committed on GitHub Feb 21, 2017
  2. Changelog for #2388

    [skip ci]
    JonRowe committed on GitHub Feb 21, 2017
  3. Add seed section into JSON formatter (#2388)

    * add seed information to json output
    takkanm committed with JonRowe Feb 21, 2017
Commits on Feb 20, 2017
  1. Merge pull request #2385 from rspec/fix_jruby

    Remove pending for JRuby 9000 specs
    JonRowe committed on GitHub Feb 20, 2017
Commits on Feb 15, 2017
  1. Ensure example_finished gets reported from context-hook failures

    Regression in c0564a3
    
    `#reporter` is a `RSpec::Core::NullReporter` at this point, so pass along
    the correct `reporter` argument.
    jenseng committed Feb 15, 2017
Commits on Feb 12, 2017
  1. minitest integration is still broken on jruby 9000

    JonRowe committed Feb 12, 2017
Commits on Feb 11, 2017
  1. Fix exception backtraces on JRuby. Fixes #2299.

    DavidEGrayson committed with JonRowe Jan 31, 2017
  2. remove jruby pends

    JonRowe committed Feb 11, 2017
Commits on Feb 1, 2017
  1. Merge pull request #2380 from rspec/fix_build

    JRuby 9.x is currently failing to install a dependency of rubocop
    JonRowe committed on GitHub Feb 1, 2017
Commits on Jan 31, 2017
  1. JRuby 9 is currently failing to install a dependency of rubocop

    JonRowe committed Jan 31, 2017
  2. Merge pull request #2379 from rspec/myron/pr-2368-rebased

    PR 2368 rebased
    JonRowe committed on GitHub Jan 31, 2017
  3. Allow streams to be used for multiple runs in a single process.

        RSpec.configure { |c| c.output_stream = File.open('testout', 'w') }
        RSpec::Core::Runner.run(["spec1"])
        RSpec::Core::Runner.run(["spec2"])
    
    This implementation is possibly a can of worms, but I _think_ I know
    what I'm doing?
    
    * close does not guarantee anymore durability than flush. To ensure "no
      bytes are lost" an fsync would be needed. Not tackling that here,
      instead just removing the relevant spec since it wasn't valid.
    * BaseFormatter contains logic to save and restore sync, which is broken
      for closed streams. The restore method was patched in the past, but
      the start method wasn't. Also, these methods aren't reliably called
      since BaseTextFormatter doesn't call super. This all probably needs a
      rethink.
    * The one reason to close would be to ensure that we don't leak file
      handles. The only time this could cause a problem is if the process
      did a heap of work _after_ rspec was finished running but before
      exiting (or in our specs if we're not careful!). In that case, since
      it's likely the object would still have an active reference via global
      configuration, it would stay open. I think this is a weird enough
      case, and small enough impact, that we're better off just letting
      process exit or GC close the file. It's also somewhat expected, since
      that's what you typically get with a non-block File.open.
    * We don't close the deprecation stream anyway. And also it's weird to
      check for $stdout to avoid closig that, but not (say) $stderr.
    * close is probably a misleading name for this formatter API, but it's
      public :( Any existing third-party formatters that close streams in
      this method today will be broken in this reuse case anyway though.
    
    Reported (among other things) in #2367
    Xavier Shay committed with myronmarston Jan 15, 2017
  4. Don't clear out shared examples in clear_examples.

    While technically examples, shared ones function more like
    configuration. When using clear_examples, it is surprising that they are
    removed since a shared library of them was likely loaded in the
    initial configuration steps.
    
    This is a change in behaviour. It was initially added in 2.9 in 8e8fb2b with no rationale. Its API visibility was unspecified at the time, and it's been officially private since 3.
    
    Reported (among other things) in #2367.
    Xavier Shay committed with myronmarston Jan 15, 2017
  5. Re-initializing the reporter when clearing examples.

    This was prompted by #2367 and the cumulative reporting out of
    deprecations. Semantically, this could be weird! Should clearing
    examples also clear the reporter? If the reporter is configured after
    initialization through a means other than standard RSpec.configure, that
    configuration would be lost. I don't know why you would do that though?
    
    The original intent of clear_examples (from #1700) seems to imply that
    reseting the reporters was desirable, so I think this is OK.
    
    It's weird that reporter belongs to configuration. It mixes state with
    configuration. This means that we have to do a "partial" configuration
    reset when we want to "reset except configuration", which suggests to me
    that we'll probably have more issues here in the future.
    
    Reported (among other things) in #2367
    Xavier Shay committed with myronmarston Jan 14, 2017
Commits on Jan 27, 2017
  1. Merge pull request #2376 from rspec/limit_rubocop

    Limit rubocop to known working platforms
    JonRowe committed on GitHub Jan 27, 2017
Commits on Jan 23, 2017
  1. limit rubocop to known working platforms

    JonRowe committed Jan 23, 2017
Commits on Jan 21, 2017
  1. Merge pull request #2375 from alyssais/patch-1

    docs: remove non-existent shared_context overload
    JonRowe committed on GitHub Jan 21, 2017
Commits on Jan 20, 2017
  1. docs: remove non-existent shared_context overload

    Fixes #2374.
    alyssais committed on GitHub Jan 20, 2017
Commits on Jan 18, 2017
  1. Merge pull request #2243 from rspec/delay_formatter_setup

    Delay formatter setup until reporter needs to notify something
    JonRowe committed on GitHub Jan 18, 2017
  2. Add comments explaining number of formatters

    [skip ci]
    JonRowe committed Jan 18, 2017
  3. correct a typo

    [skip ci]
    JonRowe committed Jan 18, 2017
Commits on Jan 17, 2017
  1. Merge pull request #2372 from rspec/fix_windows_192_build

    Fix windows build.
    JonRowe committed on GitHub Jan 17, 2017
  2. pin ffi on 1.8 and 1.9

    JonRowe committed Jan 16, 2017
  3. add spec to cover pending only output

    JonRowe committed Jan 17, 2017