Skip to content
Commits on Oct 8, 2015
  1. @morgoth
Commits on Oct 7, 2015
  1. @morgoth
  2. @morgoth

    Improve error messages wording

    morgoth committed Oct 7, 2015
Commits on Oct 6, 2015
  1. @morgoth

    Add have_enqueued_jobs matcher

    morgoth committed Oct 3, 2015
Commits on Sep 20, 2015
  1. @soulcutter

    Merge pull request #1452 from Futurelearn/faster-view-specs

    soulcutter committed Sep 20, 2015
    Halve the time it takes to run view specs by enabling the resolver cache
Commits on Sep 19, 2015
  1. @soulcutter
Commits on Sep 18, 2015
  1. @soulcutter

    Add option to add rails gems to exclusion filters

    soulcutter committed Sep 18, 2015
    Rails in backtraces can get quite spammy, and the configuration option
    to `filter_gems_from_backtrace` is not well-known since it is not found
    in the generator's `rails_helper.rb`.
    
    This adds `filter_rails_from_backtrace!` as a convenience method for
    nixing rails gems in the backtrace and adds it to `rails_helper.rb` to
    raise awareness.
Commits on Sep 2, 2015
  1. @zetter

    Speed up view specs by re-enabling resolver cache

    zetter committed Aug 27, 2015
    The caching was turned off in [1] because different formats were being
    cached under the same key. I believe the need to do this was removed
    in the previous commit.
    
    This reduces the time it takes to run FutureLearn’s view specs by 50%.
    
    I think it’s sensible to use the view resolver cache during tests because
    it’s normally on between requests in other environments including when
    creating tests with `ActionView::TestCase` in a new Rails application.
    It looks like it was only turned off in rspec-rails to work around this
    caching issue.
    
    I haven't added any test coverage in this change since it feels like
    it would be testing a negative (the resolver cache isn't cleared).
    
    [1] #864
  2. @zetter

    Ensure format is in the type that rails expects

    zetter committed Aug 27, 2015
    Rails expects value of the `:format` option be a symbol. It filters
    formats against `Mime::SET.symbols` so formats which are unknown
    (or are known but are of an unexpected type) are not used in cache keys
    for the Rails' `ActionView::Resolver::Cache`. This made the resolver
    cache unusable when there was multiple templates with the same name but
    different formats and was the reason the cache was disabled in
    rspec-rails [1].
    
    This isn't the only way of fixing this problem- for example Rails could
    be changed to ensure symbols aren't compared with strings as was
    suggested in [2], but I feel that it's rspec-rails' responsibility
    to work with the existing Rails API.
    
    [1] #864
    [2] rails/rails#13461
Commits on Aug 7, 2015
  1. @ahacop

    Add explicit access control tags to docs

    ahacop committed Aug 7, 2015
    Prior to the commit, docs for both RSpec::Rails::Matchers#be_a_new and
    RSpec::Rails::Matchers#be_new_record incorrectly indicated that the
    methods were private.
    
    This commit corrects this issue, following the pattern used here:
    https://github.com/rspec/rspec-rails/blame/1fb6f9f642e887df1b1ee344594de02d7de3b3fe/lib/rspec/rails/matchers/have_http_status.rb#L329
    (f6c277f)
    
    Fixes #1413
Commits on Aug 2, 2015
  1. @cupakromer

    Merge pull request #1440 from AEgan/redirect-render-message

    cupakromer committed Aug 2, 2015
    modify error message when redirected but expecting to render a template
  2. @AEgan

    Add yard doc and description in have_rendered.rb, add more

    AEgan committed Aug 2, 2015
    descriptive param name in spec
  3. @AEgan
Commits on Aug 1, 2015
  1. @jamelablack

    Removed " " in regex

    jamelablack committed Aug 1, 2015
  2. @jdax
Commits on Jun 18, 2015
  1. @JonRowe

    refactor rspec-mocks callback to only run on active record subclasses…

    JonRowe committed Jun 16, 2015
    … without respond_to checks
Commits on Jun 16, 2015
  1. @JonRowe
Commits on Jun 13, 2015
  1. @myronmarston
Commits on Jun 12, 2015
  1. @myronmarston

    Bump version to 3.4.0.pre.

    myronmarston committed Jun 12, 2015
  2. @myronmarston

    Release 3.3.0

    myronmarston committed Jun 12, 2015
Commits on May 26, 2015
  1. @cupakromer

    Fix `controller` attribute access.

    cupakromer committed May 26, 2015
    This fixes the access to the controller attribute, making it clear that
    the setter should be a `private` internal API. This was reflected
    previously in the YARD doc, but that did not match the code.
Commits on May 25, 2015
  1. @cupakromer

    Reach minimal 100% doc coverage.

    cupakromer committed May 25, 2015
    This addresses doc coverage issues with the most recent release of YARD.
  2. @cupakromer

    Address yard warnings

    cupakromer committed May 25, 2015
    > [warn]: in YARD::Handlers::Ruby::MethodHandler: Undocumentable method defined on object instance
    > [warn]:         in file 'lib/rspec/rails/configuration.rb':73:
    >
    >         73: def config.render_views=(val)
    >
    > [warn]: in YARD::Handlers::Ruby::MethodHandler: Undocumentable method defined on object instance
    > [warn]:         in file 'lib/rspec/rails/configuration.rb':77:
    >
    >         77: def config.render_views
    >
    > [warn]: in YARD::Handlers::Ruby::MethodHandler: Undocumentable method defined on object instance
    > [warn]:         in file 'lib/rspec/rails/configuration.rb':81:
    >
    >         81: def config.render_views?
    >
    > [warn]: in YARD::Handlers::Ruby::MethodHandler: Undocumentable method defined on object instance
    > [warn]:         in file 'lib/rspec/rails/configuration.rb':85:
    >
    >         85: def config.infer_spec_type_from_file_location!
    >
    > [warn]: Syntax error in `lib/generators/rspec/mailer/templates/preview.rb`:(1,1): syntax error, unexpected '<'
    > [warn]: in YARD::Handlers::Ruby::MixinHandler: Undocumentable mixin: YARD::Parser::UndocumentableError for class RSpec::Rails::RoutingExampleGroup
    > [warn]:         in file 'lib/rspec/rails/example/routing_example_group.rb':11:
    >
    >         11: include RSpec::Rails::AssertionDelegator.new(ActionDispatch::Assertions::RoutingAssertions)
    >
    > [warn]: in YARD::Handlers::Ruby::MixinHandler: Undocumentable mixin: YARD::Parser::UndocumentableError for class RSpec::Rails::ControllerExampleGroup
    > [warn]:         in file 'lib/rspec/rails/example/controller_example_group.rb':12:
    >
    >         12: include RSpec::Rails::AssertionDelegator.new(ActionDispatch::Assertions::RoutingAssertions)
    >
    > [warn]: Syntax error in `lib/generators/rspec/install/templates/spec/rails_helper.rb`:(23,1): syntax error, unexpected '<', expecting end-of-input
  3. @cupakromer

    Achieve 100% doc coverage

    cupakromer committed May 25, 2015
    Both of these are meant to be private APIs. They were not marked as such
    before because the `bin/yard` command was failing previously.
Commits on May 23, 2015
  1. @cupakromer

    Prep for removal of fixture support globally.

    cupakromer committed May 19, 2015
    This adds metadata to ad-hoc include fixture support for any examples or
    groups which may require it. It additionally, includes fixture support
    into all default `RailsExampleGroup` modules. This provides the current
    functionality for the majority of use cases.
  2. @cupakromer

    Fix load order :bug:

    cupakromer committed Apr 17, 2015
    This fixes an "undefined method `fixture_path`" error caused in
    `RSpec::Core::Configuration`. The issue occurs when a spec is created
    before rspec-rails is loaded. The cause is rspec-core attempts to
    include the `RSpec::Rails::FixtureSupport` module into the existing spec
    as soon as we tell the configuration about it, but have not told the
    configuration about the new related options.
    
    This moves the including of the module until after we have told the
    configuration about the dependent options.
    
    This includes a spec which is named in a manner to attempt to ensure it
    is the first spec loaded by rspec-core; which loads spec files
    alphabetically. To ensure we test the issue the run script is updated to
    also run this spec file standalone.
    
    When discussing rspec/rspec-rails#1355 it was agreed that we need to
    consider removing this global inclusion of the fixture support. Instead
    favoring including it in the `RailsExampleGroup`. A deprecation comment
    has been included to remind us later.
Commits on May 7, 2015
  1. @JonRowe

    changelog and cleanup for #1361

    JonRowe committed May 7, 2015
    [skip ci]
Commits on May 6, 2015
  1. @gabetax
  2. @gabetax
Commits on May 5, 2015
  1. @gabetax
Commits on Apr 12, 2015
  1. @orien
Commits on Apr 9, 2015
  1. @orien
Commits on Mar 18, 2015
  1. @cupakromer

    Fix action mailer preview path setup.

    cupakromer committed Feb 23, 2015
    This removes the unnecessary warning about a preview path set to a
    location other than `/spec/mailers/preview`.
    
    This does not force `ActionMailer` to load when the Railtie runs by
    removing the `defined?` check. This is necessary because the
    `ActionMailer` class only loads it's settings once, after it is first
    loaded. If we load the class in our Railtie any custom settings declared
    in a config block in an initializer will be ignored.
    
    An improved spec suite for the different permutations of availability of
    action mailer previews is included as well.
  2. @cupakromer

    Merge pull request #1289 from tinynumbers/view-example-helper-class-bug

    cupakromer committed Mar 17, 2015
    If a view example's description contains no path elements, then do not attempt to load a helper based on the example description.
Commits on Mar 10, 2015
  1. @cupakromer

    Merge pull request #1308 from davydovanton/yield

    cupakromer committed Mar 10, 2015
    Replace excess &block in arguments to yield construction
Something went wrong with that request. Please try again.