Permalink
Commits on Sep 19, 2016
  1. Changelog for #2328

    JonRowe committed Sep 19, 2016
    [skip ci]
Commits on Sep 18, 2016
  1. Merge pull request #2331 from rspec/myron/move-options-in-help-output

    JonRowe committed Sep 18, 2016
    Organize options in `--help` output more logically.
  2. Organize options in `--help` output more logically.

    myronmarston committed Sep 18, 2016
    * `--init` belongs in the utility section with `--version`
      and `--help`.  It's not a normal option that warrants being
      listed near the top.
    * `--dry-run` is an output option and belongs in that section.
Commits on Sep 11, 2016
  1. Merge pull request #2327 from rspec/change_git_to_https

    JonRowe committed Sep 11, 2016
    Change gemfile read only git from git to https
Commits on Sep 10, 2016
  1. Merge pull request #2323 from rspec/myron/handle-spec-file-load-errors

    JonRowe committed Sep 10, 2016
    Handle errors during spec file load time in a nicer manner.
Commits on Sep 9, 2016
  1. Handle errors during spec file load time in a nicer manner.

    myronmarston committed Sep 2, 2016
    - Format them like other errors.
    - Allow other files to be loaded so you can see all
      the load-time errors.
    - Abort the test suite before running any examples.
    
    This has a slight affect on the bisect server: previously
    it would get no run results at all if a load-time error
    occurred in the spec files. Now it gets run results but
    they are empty. The change happens because the error is handled,
    allowing the bisect formatter to report results in `start_dump`.
Commits on Sep 8, 2016
  1. Ensure `ConsoleCodes` is loaded in all files that reference it.

    myronmarston committed Sep 6, 2016
    Previously, it was required from `base_text_formatter`
    and `profile_formatter`, but was used from a number of
    other places. An unrelated change I was making that affected
    bisect caused it to hit a code path that tried to use
    `ConsoleCodes` without it being loaded, resulting in an error.
    
    Note: I had to change `CONFIG_COLORS_TO_METHODS` from a constant
    to a method to delay the `Configuration.instance_methods` call.
    With the require changes, the `console_codes` file is now loaded
    before `configuration` and therefore cannot query it at load
    time.
Commits on Sep 2, 2016
  1. Merge pull request #2320 from rspec/myron/fix-after-context-failures

    JonRowe committed Sep 2, 2016
    Set the exit status to non-zero for `after(:context)` errors.
Commits on Sep 1, 2016
Commits on Aug 29, 2016
  1. Merge pull request #2316 from rspec/myron/handle-errors-in-suite-hooks

    JonRowe committed Aug 29, 2016
    Handle errors in :suite hooks.
Commits on Aug 25, 2016
  1. Merge pull request #2318 from rspec/myron/address-slowness

    JonRowe committed Aug 25, 2016
    Fix issue causing our spec suite to run much slower.
  2. Fix issue causing our spec suite to run much slower.

    myronmarston committed Aug 25, 2016
    Before this change:
    
    $ bin/rspec | egrep 'Finished|(examples.*failure)'
    Finished in 45.99 seconds (files took 0.89765 seconds to load)
    2014 examples, 4 failures, 1 pending
    
    After this change:
    
    $ bin/rspec | egrep 'Finished|(examples.*failure)'
    Finished in 11.16 seconds (files took 1.16 seconds to load)
    2014 examples, 4 failures, 1 pending
    
    I believe the issue was requiring 'rspec/rails/version'. Since
    rspec-rails is not available, rubygems would exhaustively search
    all my installed gems before raising `LoadError`. I have ~300 gems
    installed and this was quite slow.
    
    It's better to just force it to raise `LoadError` and not wait on
    RubyGems to do the same thing.
  3. Address code review feedback.

    myronmarston committed Aug 25, 2016
    - s/exception/example/ in a comment
    - Do not run later `before(:suite)` hooks when an earlier
      one has failed. This aligns with `before(:example)` and
      `before(:context)` hooks.  However, `after(:suite)` hooks
      all get run even if one fails, which again aligns with
      `after(:example)` and `after(:suite)` hooks.
  4. Handle errors in :suite hooks.

    myronmarston committed Jul 11, 2016
    Previously, we just allowed the error to propagate to
    the user, which was a subpar experience for a few reasons:
    
    - The error would cause RSpec to crash, leading to a long
      stack trace containing lots of extraneous info the user
      did not see.
    - The error was not formatted nicely like other errors
      that happen while RSpec runs.
    - If the error happened in an `after(:suite)` hook, the test
      suite had finished running all specs but the summary of the
      results would not get printed since RSpec had crashed.
    
    Now, we handle errors in :suite hooks and format the output
    the same way failures and errors are normally printed.
Commits on Aug 24, 2016
Commits on Aug 23, 2016
Commits on Aug 22, 2016
  1. Refactor: support `FailedExampleNotification.new(example)`.

    myronmarston committed Jul 11, 2016
    Previously, a second `exception_presenter` argument was required.
Commits on Aug 20, 2016
  1. Make `ExceptionPresenter#fully_formatted` support a `nil` arg.

    myronmarston committed Aug 20, 2016
    This is necessary for cases where the error is not part
    of a numbered sequence (such as a :suite hook error).
  2. Merge pull request #2313 from rspec/myron/make-spec-resilient

    myronmarston committed Aug 20, 2016
    Make spec resilient to changes to this spec file.
  3. Make spec resilient to changes to this spec file.

    myronmarston committed Aug 20, 2016
    Hard coding the line number was very brittle.
Commits on Aug 15, 2016
  1. Merge pull request #2310 from Nitrodist/mc/fix-typo

    myronmarston committed Aug 15, 2016
    Fix typo by adding a space to a code example
Commits on Jul 28, 2016
  1. Merge pull request #2307 from rspec/myron/fix-2306

    myronmarston committed Jul 28, 2016
    Revise how conflicted metadata is handled when applying shared group metadata
  2. Revise how conflicted metadata is handled when applying shared group …

    myronmarston committed Jul 28, 2016
    …metadata.
    
    Previously, when applying shared group metadata to a host, if there were
    any conflicts, the host group metadata would take precedence, but this
    created some counterintuitive behavior.  For example, in a case like
    this:
    
    RSpec.shared_examples_for "model stuff", db: true do
      it "does something using the DB" do
        # ...
      end
    end
    
    RSpec.describe "Some cross cutting concern", db: false do
      it_behaves_like "model stuff"
    end
    
    ...the example from the shared group would NOT have `db: true` metadata
    in spite of the fact that `it_behaves_like` creates a nested group and
    if you manually created a nested group at that spot with `:db`, it would
    take precedence over the outer `db: false` metadata.
    
    With this change, metadata applied from a shared group takes precedence
    over host group metadata if the conflicted value was inherited from a
    parent group. If the conflicted value was set directly on the host
    group, it still takes precedence.
    
    Fixes #2306.