Skip to content
This repository

Mar 24, 2014

  1. Myron Marston

    Refactor: simplify how shared example groups are found.

    authored March 21, 2014
  2. Myron Marston

    Improve docs some more.

    authored March 21, 2014

Mar 22, 2014

  1. Xavier Shay

    Prevent creating an isolated context when already inside a context.

    There is no reason to do this, and it could potentially cause unexpected
    bugs.
    authored March 22, 2014

Mar 21, 2014

  1. Myron Marston

    Improve docs.

  2. Myron Marston

    Make `:example` and `:context` scopes primary.

    Fixes #1184.

Mar 20, 2014

  1. Myron Marston

    Provide doc groupings.

    authored March 19, 2014
  2. Myron Marston

    Add fspecify and fexample for parity with fit.

  3. Myron Marston

    Remove `:focused` metadata.

    It's a bit silly to double up with `:focused` and `:focus`.
    
    This still needs a 2.99 deprecation.
  4. Myron Marston

    Refactor example group aliasing.

    - Bring it in line with how example and
      shared example aliasing work.
    - Improve the docs.
  5. Myron Marston

    Organize ExampleGroup methods into a logical order.

    authored March 19, 2014

Mar 19, 2014

  1. Myron Marston

    Improve docs.

    authored March 19, 2014
  2. Myron Marston

    Remove unnecessary example group methods.

    We still need a 2.99 deprecation for these.
    authored March 19, 2014
  3. Myron Marston

    Refactor example group macros.

    They were structured so that they were defining a singleton method on the singleton class (meaning it actually got defined
    on the singleton class of the singleton class) which makes
    my head hurt. This is far simpler.
  4. Myron Marston

    Clean up `instance_exec_with_rescue`.

    - Remove it from `ExampleGroup`. Every ExampleGroup
      instance method is an opportunity for users to
      inadvertently stomp it with their own method def
      since `describe` blocks are eval'd in the context of
      an example group subclass.
    - Add specs for suite hook behavior.
    - Provide an explicit context for suite hook context.
    authored March 18, 2014
  5. Myron Marston

    Prefer *_exec over *_eval.

    - The `_exec` versions do not allow string eval.
      We don't want to do any string eval.
    - The `_eval` versions yield the receiver (even
      though it'll be `self` within the block) which
      we don't generally want.
    - 1.8.6 lacked `*_exec` so we used `*_eval` in RSpec 2.
    authored March 18, 2014

Mar 18, 2014

  1. Myron Marston

    Further doc improvements.

    [ci skip]
    authored March 18, 2014
  2. Myron Marston

    Reformat wrapped trailing conditional.

  3. Myron Marston

    Prefer `def self.<name>` over def within `class << self`.

    authored March 18, 2014
  4. Myron Marston

    Remove method aliases that we don't need.

    Deprecations are still need in 2.99 for these.
    authored March 18, 2014
  5. Myron Marston

    Remove unnecessary layer of indirection.

  6. Myron Marston

    Simplify `rescue` clause.

  7. Myron Marston

    Merge pull request #1394 from cupakromer/warn-on-pending-block

    Warn on pending block
    authored March 17, 2014

Mar 17, 2014

  1. Myron Marston

    Fix 1.8.7 syntax errors.

    - 1.8.7 doesn't allow defaults for bock args.
    - 1.8.7 doesn't allow trailing commas in lists.
    authored March 16, 2014

Mar 16, 2014

  1. Myron Marston

    Allow hashes and symbols to be used as an implicit subject.

    Fixes #1240.
    
    This still needs a 2.99 deprecation.
    authored March 16, 2014

Mar 15, 2014

  1. Myron Marston

    Leverage metadata delegation a bit more.

    authored March 15, 2014
  2. Myron Marston

    Use `Proc#source_location` rather than `caller` for :location.

    As @xaviershay discovered rspec/rspec-mocks#401,
    `caller` is surprisingly slow.
    authored March 14, 2014
  3. Myron Marston

    Store :block in the metadata consistently.

    We'll still need to deprecate :example_group_block
    in 2.99.
    authored March 14, 2014
  4. Myron Marston

    Simplify a few things related to :parent_example_group.

    - Always have a :parent_example_group key. It'll return
      a blank hash if there is no parent example group.
    - Simplify how `full_description` is built.
    authored March 13, 2014
  5. Myron Marston

    Refactor metadata so it does not subclass hash at all.

    authored March 13, 2014
  6. Myron Marston

    Change nesting structure of example group metadata.

    Historically, an example group's metadata hash has
    exposed its computed values via a nested `:example_group`
    subhash, and then exposed it's parent's metadata via
    an additional `:example_group` subhash nested within
    that subhash.  Example:
    
    describe "Parent", :parent => true do
      context "child", :child => true do
        $meta = metadata
      end
    end
    
    `$meta` in this example would be a hash like:
    
    {
      :parent => true, # inherited,
      :child => true,
      :example_group => {
        :line_number => 2, # and other computed properties
        :example_group => {
          :parent => true,
          :example_group => { :line_number => 1 } # and others
        }
      }
    }
    
    As you can see, this is quite confusing. Why should an example group's metadata have an `:example_group` key that returns its
    own metadata?
    
    This commit changes to the following example structure:
    
    {
      :parent => true, # inherited,
      :child => true,
      :line_number => 2, # and other computed properties
      :parent_example_group => {
        :parent => true,
        :line_number => 1 # and others
      }
    }
    
    ...which is far easier to understand. This also aligns
    with how an example's metadata works: it's computed
    properties are available directly off of its metadata
    hash rather than off of a nested subhash.
    
    We've changed from `:example_group` to `:parent_example_group`
    for the parent metadata both because it's a better label
    (an example group doesn't have an example group, but it may
    have a parent example group) and also because it allows us
    to provide backwards compatibility and deprecation notices
    when the `:example_group` key is accessed. Note that an
    example's metadata hash continues to have a `:example_group`
    key that returns the group's metadata; this is not deprecated.
    authored March 12, 2014
  7. Myron Marston

    Refactor metadata so that it is prepopulated.

    authored March 11, 2014
  8. Aaron Kromer

    Minor typo and trailing whitespace fix.

    authored March 14, 2014
  9. Jon Rowe

    restore `@param name [Type]` format and switch @attr to match

    authored March 15, 2014

Mar 12, 2014

  1. Adam Farhi

    Achieve 100% doc coverage

    authored March 02, 2014 JonRowe committed March 13, 2014

Mar 10, 2014

  1. Myron Marston

    Refactoring: extract filtering logic from metadata.

    Previously, the metadata classes had two distinct
    responsibilities:
    
    * Manage special computed rspec metadata properties
      such as file_path, described_class, etc.
    * Implement filtering logic that determines if a
      particular filter hash applies to the metadata hash.
    
    It greatly simplifies things to extract the metadata
    filtering logic into its own module. This greatly
    reduces the surface are of the metadata objects
    and is a stepping stone towards no longer subclassing Hash.
    authored March 09, 2014
Something went wrong with that request. Please try again.