Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rspec/rspec-rails
...
head fork: rspec/rspec-rails
This comparison is big! We’re only showing the most recent 250 commits
Commits on Sep 05, 2014
@myronmarston myronmarston Bump version to 3.2.0.pre. b4384f9
Commits on Sep 11, 2014
@samphippen samphippen Explicitly create pathnames in sanity_check_spec.rb
This is so that we can return strings *or* pathnames from
RSpec::Core::RubyProject.root
0c088b6
@cupakromer cupakromer Merge pull request #1168 from rspec/samphippen/enhancement/sanity_che…
…ck_pathname

Explicitly create pathnames in sanity_check_spec.rb
2d5f3f0
Commits on Sep 18, 2014
@createdbypete createdbypete Consistently use single quotes for rails_helper template 0cfbe47
@JonRowe JonRowe Merge pull request #1176 from createdbypete/consistent-use-of-quotes
Consistently use single quotes for rails_helper template
a679dc5
Commits on Sep 26, 2014
@JonRowe JonRowe Updated travis build scripts (from rspec-dev) 8e692ef
@cupakromer cupakromer Merge pull request #1178 from rspec/update-travis-build-scripts-2014-…
…09-26-for-master

Updates from rspec-dev (2014-09-26)
c3fb3b9
@cupakromer cupakromer Add Ruby 2.1.3 to build matrix. 6ef5fd2
Commits on Sep 29, 2014
@cupakromer cupakromer Bump to Rails 4.2.0.beta2 142578d
Commits on Oct 06, 2014
@takashi takashi add preview generator to mailer generator 5624532
@takashi takashi check if ActionMailer::Preview exists 26f19b9
Commits on Oct 07, 2014
@takashi takashi fix typo b081878
@JonRowe JonRowe Merge pull request #1186 from takashi/fix-typo
fix typo
dc294f6
Commits on Oct 10, 2014
@takashi takashi add config.action_mailer.preview_path
when rails rspec:install is run
dc11b76
Commits on Oct 14, 2014
@elenasharma elenasharma Correct README pluralization of API to APIs from API's. 43ed34a
@cupakromer cupakromer Merge pull request #1193 from elenasharma/correct_API_pluralization_R…
…EADME

Correct README pluralization of API to APIs from API's.

[ci skip]
b9027c1
Commits on Oct 16, 2014
@JonRowe JonRowe manually tag request specs to aid users 44c9334
@JonRowe JonRowe manually tag type examples 31fe4d0
@JonRowe JonRowe modify features blurb 996bef8
@JonRowe JonRowe update or add wording indicating the use of `:type` tagging and our p…
…reference for it over inferring location
eabf9bc
Commits on Oct 17, 2014
@JonRowe JonRowe Merge pull request #1190 from rspec/update_request_docs
manually tag request specs to aid users
211f526
Commits on Oct 28, 2014
@espadrine espadrine Readme: Use an SVG badge.
That way, both badges will have the same design. Also, they'll look good even on retina displays.
c147254
@cupakromer cupakromer Merge pull request #1196 from espadrine/patch-1
Readme: Use an SVG badge.

[ci skip]
77fb5c4
Commits on Oct 30, 2014
@myronmarston myronmarston Updated travis build scripts (from rspec-dev) 2785d7b
Commits on Oct 31, 2014
@cupakromer cupakromer Update custom scripts to match rspec-dev changes. dc51972
@cupakromer cupakromer Update travis matrix as well. 55975a4
@myronmarston myronmarston Merge pull request #1199 from rspec/update-travis-build-scripts-2014-…
…10-30-for-master

Updates from rspec-dev (2014-10-30)
0e7b770
Commits on Nov 05, 2014
@glittershark glittershark Use context in controller spec for scaffolds
Use `context` instead of `describe` for the valid/invalid param
contexts in the controller spec template for the scaffold generator.
This seems like it better follows BDD practices.
7b9f7d4
@JonRowe JonRowe Merge pull request #1204 from glittershark/context-in-controller-scaf…
…fold-spec

Use context in controller spec for scaffolds
6ab7c47
@JonRowe JonRowe changelog for #1204
[skip ci]
fe07b55
Commits on Nov 07, 2014
@glittershark glittershark Use #method syntax in controller spec, to match doc
Use 'GET #index' instead of 'GET index', etc. in the scaffold controller
spec, to match the [sample controller specs in the README][1]

[1]: https://github.com/rspec/rspec-rails#controller-specs
6ea6dbf
@glittershark glittershark Use #method syntax in standalone controller spec
Use `#method` syntax in the generator for the standalone controller
spec, to match the documentation.

/cc @cupakromer
bcfa096
@glittershark glittershark Add line in changelog for #1206 [ci skip] 059cd0d
@cupakromer cupakromer Merge pull request #1206 from glittershark/controller-spec-method-syntax
Use #method syntax in controller spec, to match doc
a25c042
Commits on Nov 12, 2014
@dideler dideler Remove History.md
The changelog now exists at the root of the project, not at
features/Changelog.md.

[skip ci]
2a41acb
@JonRowe JonRowe Merge pull request #1215 from dideler/remove-outdated-history.md
Remove History.md
ead953c
Commits on Nov 13, 2014
@dideler dideler Remove Upgrade.md
- It points to a non-existent location
- There's an upgrade section in the project's README

[skip ci]
0c2ccad
@JonRowe JonRowe Merge pull request #1216 from dideler/remove-outdated-upgrade.md
Remove Upgrade.md
2a7b518
Commits on Nov 15, 2014
@JonRowe JonRowe Updated travis build scripts (from rspec-dev) 7e3eb34
Commits on Nov 16, 2014
@cupakromer cupakromer Merge pull request #1220 from rspec/update-travis-build-scripts-2014-…
…11-15-for-master

Updates from rspec-dev (2014-11-15)
4489b8a
@cupakromer cupakromer Fix failing builds on Rails 4.2.0-beta
Rails updated the way route generation errors are raised. Specifically,
this applies only to internal server code which generates a route and
not routes passed in from a request. This change comes from
rails/rails#16229. In a nutshell, the change is
`ActionController::UrlGenerationError` no longer inherits from
`ActionController::RoutingError`.

This updates the cukes which expect the unknown routes used in the
internal rails controller code to raise the correct base error
`UrlGenerationError`.

The current routing matchers do not require updating as they do not rely
on the internal route generation code. Instead they are utilizing the
routing engine's path for parsing routes passed from requests. This
path still raises a `ActionController::RoutingError`.
1cef609
@cupakromer cupakromer Add more local ignore files.
Allows for multiple `.rails-versionX` files to exist so developers can
easily symlink the root `.rails-version` instead of modifying its
contents.

Ignores the `specs.out` generated when running the full build script.

[ci skip]
2e8cba4
@cupakromer cupakromer Eliminate scrolling in cuke examples. c034b86
@cupakromer cupakromer Verify that the newer `UrlGenerationError` exists.
Ensure we use the proper error based on the Rails version, by check for
it's presence.
18e40b9
@cupakromer cupakromer Merge pull request #1222 from rspec/update-ignored-files
Add more local ignore files.
f13d5e9
@cupakromer cupakromer Ignore Rails 3.0.x on Ruby 2.1.4
This was missing when Ruby 2.1.4 was added.
b3c3fce
Commits on Nov 17, 2014
@cupakromer cupakromer Merge pull request #1221 from rspec/fix-4-2-failures
Fix failing builds on Rails 4.2.0-beta
dd72e25
@cupakromer cupakromer Reduce build matrix from 81 jobs to 36.
The build matrix is getting way too large. Even with the high
parallelization of the matrix it still takes 2.5+ hours of real time to
complete.

With the release of Ruby 2.1.5 we see the build matrix grow by another
nine combinations, increasing from 72 to 81 jobs. While Ruby 2.1 tends
to run faster, it still is more time to wait.

Currently, there has not been a Ruby 2.1.x specific bug reported for any
of the 2.1 releases. Ruby it attempting to follow close to SemVer for
the 2.1+ releases. With this change, I feel it is relatively safe to
adopt this lighter build matrix.

If an issue does appear which is specific to a single 2.1.x release, we
can easily add it back. If it only occurs with a specific Rails version
then we can use the `include` feature to only add back as few jobs as
necessary.
227b9f0
@eliotsykes eliotsykes Forward port pull request #1194 from eliotsykes:patch-1
Changed to '~> 3.0' as requested

Resolve #1224

[ci skip]
9b204f9
Commits on Nov 23, 2014
@sevenseacat sevenseacat Make sure the `rspec:feature` generator generates code that works whe…
…n monkey-patching is disabled
2220cf5
@cupakromer cupakromer Merge pull request #1231 from karpah/disable_monkey_patching_generati…
…ng_features

Make sure the `rspec:feature` generator generates code that works when monkey-patching is disabled

[ci skip]
52b46f1
@cupakromer cupakromer Update changelog with fix from #1231.
:heart: for the patches!

[ci skip]
03f3e14
@cupakromer cupakromer Merge pull request #1223 from rspec/reduce-build-matrix
Reduce build matrix from 81 jobs to 36.

[ci skip]
3fb9adc
Commits on Nov 25, 2014
@JonRowe JonRowe Badges are crisper as svg
[skip ci]
998f377
@JonRowe JonRowe Merge pull request #1234 from rspec/badges_as_svg
Switch readme badges to svg
ee48765
@cupakromer cupakromer Merge pull request #1185 from takashi/add-preview-generator-to-mailer…
…-generator

add preview generator to mailer generator
f7a33b3
Commits on Nov 27, 2014
@cupakromer cupakromer Temporarily Lock the arel version.
Rails <4.2.0.beta4 does not properly handle the changes in Arel 6.0.0.
Until beta5 is released we need to lock the version down so the builds
pass.
b76bb81
Commits on Nov 28, 2014
@cupakromer cupakromer Bump to Rails 4.2.0.rc release line.
Locking `arel` is no longer necessary as the RC1 release has the proper
fixed arel call. However, it requires `rails-dom-testing` 1.0.5+ which
fails for us on Travis CI (linux). This allows the Rails 4.2.0 envs to
fail without killing the build, until `rails-dom-testing` is fixed.

See rails/rails-dom-testing#28
9f40ab4
@cupakromer cupakromer Properly ignore 4.2 on Ruby 1.9.2 & 1.8.7 71e0522
Commits on Dec 25, 2014
@yujinakayama yujinakayama Use i18n gem < 0.7.0 under Ruby 1.9.3
i18n 0.7.0 no longer supports Ruby < 1.9.3.

https://github.com/svenfuchs/i18n/blob/v0.7.0/i18n.gemspec#L21
bc530a4
Commits on Dec 27, 2014
@myronmarston myronmarston Updated travis build scripts (from rspec-dev) 523194a
@yujinakayama yujinakayama Fix failing scenario caused by a behavior of Rail.root with symlink
The failing scenario was caused by a change in Rails that affects
Rails.root when a Rails::Application is defined in symlinked file.

rails/rails#17782

We've been set up Aruba workspace in each Cucumber scenario with
symlinks, but this tends to behave differently from real files.
Since the example_app project is not so large, we can simply clone it in
each scenario.
440815a
@yujinakayama yujinakayama Remove strange conditional in generate:app task
The `bindir` is rspec-rails' one. We want to run `bundle binstubs` in
the `tmp/example_app` project so the conditional `if test, 'd', bindir`
is useless.
b3b3306
@cupakromer cupakromer Merge pull request #1256 from rspec/update-travis-build-scripts-2014-…
…12-26-for-master

Updates from rspec-dev (2014-12-26)

[ci skip]
ba3d5b6
@cupakromer cupakromer Merge pull request #1257 from rspec/fix-build
Fix Ruby 1.9.3 and Rails 4.1 builds
a50a112
Commits on Dec 28, 2014
@benmoss benmoss Updated travis build scripts (from rspec-dev) 2c59ffa
@myronmarston myronmarston Merge pull request #1258 from benmoss/update-travis-build-scripts-201…
…4-12-27-for-master

Updated travis build scripts (from rspec-dev)
6cabdac
@cupakromer cupakromer Update supported RSpec versions.
Rails 4.2.0 has been officially released. Drop usage of the RC line and
use the main releases.

Rails `master` is now targeting Rails 5.x. Plans for Rails 5.x support
with RSpec is not official yet. Until we determine our planned support
line drop support for Rails `master` on rspec-rails `master`.
3724ca0
@cupakromer cupakromer Start supporting Ruby 2.2 5de1bef
@cupakromer cupakromer Rails 4.2.0 must pass now. 92ca950
@cupakromer cupakromer Merge pull request #1259 from rspec/build-matrix-update-rails-4_2
Update supported RSpec versions.
a13ed43
@cupakromer cupakromer Force generators to abort if they fail.
Rails does not seem to provide a clean way to abort something if a
generator fails. Under most circumstances this is probably the proper
solution.

However, for us, these generators calls also function as smoke tests for
our actual generator code. If one of them fails, we need to fail the
build. Thankfully, if the generator had a problem the status is captured
in `$?`. We can verify that the last process was successful and abort
when it is not; thus failing the build and notifying the team.
2fd7b70
@cupakromer cupakromer Fix broken generator.
The generator was failing due to the missing require.
860319e
@cupakromer cupakromer Configure Action Mailer `preview_path` in railtie
This mirrors how Rails sets up the default `preview_path`. Using a
`before_initialize` allows the environments to be loaded but shims in
before Rails sets up its `test/` default.
1580b7a
@cupakromer cupakromer Remove old implementation of setting the path. fdc66ac
@cupakromer cupakromer Note ActionMailer preview updates in Changelog. 7764882
@cupakromer cupakromer Fix how Rails 4.1 handles showing previews. e4923e6
@cupakromer cupakromer Remove skipped spec.
This is being tested via the rake task which uses the generated example
app. It would be nice to have a lighter weight method of testing the
railties in the main RSpec suite, until then keeping this :skull: spec
around just clutters the code base.
428872d
@cupakromer cupakromer Merge pull request #1236 from rspec/move-preview_path-default
Move preview path default
49a20ab
Commits on Dec 29, 2014
@eliotsykes eliotsykes Display previously hidden RSpec generators in generator usage docs ou…
…tput by 'rails g'
11a56b5
@cupakromer cupakromer Handle feature specs without Capybara.
When Capybara has not been loaded the RSpec suite fails with syntax
errors on `feature` and `scenario`. While Capybara is an external gem
dependency, rspec-rails is so tightly coupled with it, necessitating
some basic support for the syntax.

This adds coverage for both the external documentation cukes and the
Rails app smoke specs. To prevent RSpec from raising confusing syntax
errors when Capybara is not available we shim on top of the basic
syntax: `feature` and `scenario`. Without both of these we receive
syntax failures with basic feature specs.

Since RSpec does not support the reset of the Capybara methods / DSL the
specs are skipped by default. A helpful message about using Capybara is
displayed when skipped.

Updates the cuke to match changes from #1231. This uses the `RSpec`
namespace for calling `feature`. It also adds the `:type => :feature`
metadata. rspec-rails needs to hook into feature example groups, this
change ensures that happens by setting the appropriate `:type`.

While Capybara does include the `:type` metadata automatically it may
not always. Most of the Capybara related hooks actually rely on the
metadata: `:capybara_feature => true`.
fbbe1e2
@cupakromer cupakromer Fix up documentation spacing for web display. d4683c6
@cupakromer cupakromer Observers were removed in Rails 4.0
Observers still exist but are in an external gem:

    https://github.com/rails/rails-observers
eee632d
@cupakromer cupakromer Handle Capybara < 2.4.x with zero monkey patching.
Capybara 2.2.x and 2.3.0 do not properly handle RSpec no monkey patching
mode. Unfortunately, proper support in Capybara was only added in
2.4.0. However, rspec-rails claims to support Capybara >= 2.2.0 so we need
inform the user of this mismatch.
4184d68
@cupakromer cupakromer Update changelog with fix. 1a9e66b
@cupakromer cupakromer Merge pull request #1261 from rspec/improve-feature-ux
Improve feature ux
c94dd6c
@cupakromer cupakromer Merge pull request #1248 from eliotsykes/unhide-generators-from-rails-g
Display previously hidden RSpec generators in generator usage docs output by 'rails g'
3d8a232
@cupakromer cupakromer Update Changelog with `rails g` changes in #1248.
TestUnit gets special treatment when it comes to the generators listed
when running `rails generate`. Since it is not set as the test framework
until much later in the startup process all of it's generators can be
seen. Unfortunately, when RSpec hooks into the Railtie we don't have the
option of deferring until later. This hid all of the available RSpec
generators.

This change allows users to see and run the default generators
standalone. While this isn't a common practice, it is sometimes useful
when certain components are manually created outside of
`rails g COMPONENT`.

[ci skip]
3e88cdc
@cupakromer cupakromer Test Rail 4.0.x with Ruby 2.2.x ac419d6
Commits on Dec 30, 2014
@cupakromer cupakromer Support using an older Minitest gem on Ruby 2.2 999ebb7
@cupakromer cupakromer Merge pull request #1264 from rspec/ruby-2_2-on-rails-4_0
Ruby 2.2 on Rails 4.0 support
1c78c29
@cupakromer cupakromer Note support for Ruby 2.2 with Rails 4.x fe7bf65
@cupakromer cupakromer Only define `:feature` alias if it's not available
It is possible that Capybara is required before the
`FeatureExampleGroup`. It is also possible another gem or a custom
`feature` implementation is already availble. This does not define our
custom alias if `RSpec.feature` already exists.
e534d51
@cupakromer cupakromer Be more specific the related configuration option. 12d915e
Commits on Dec 31, 2014
@cupakromer cupakromer Do not override existing custom `feature` aliases.
It's possible that a user has their own custom `feature` alises which
has already been loaded. If we detect the alias we shouldn't write our
own.
0192401
@cupakromer cupakromer Set Capybara metadata.
This lets us hook into the expanded Caybara DSL once Capybara is loaded.
This is most helpful for apps in the process of upgrading and moving to
no monkey patching. This allows us to parse the specs successfully with
the expanded DSL while when the user hasn't upgraded Capybara.
cb69a9e
@cupakromer cupakromer Reset Capybara's monkey patch on old versions.
Apps just upgrading to RSpec 3 are more likely to have several
conditions which may cause a poor user experience:

- Version of Capybara prior to 2.4.0
- Loading Capybara before rspec-rails in `spec/spec_helper.rb`
- Not enabling monkey patch mode or have set:

  `config.expose_dsl_globally = false`

When these conditions are all met our `feature` alias is exposed
globally overwriting the Capybara monkey patch. This will cause all
feature specs to be skipped.

For a user attempting to upgrade an app this can be a very frustrating,
and confusing, "bug".
56117e7
@cupakromer cupakromer Merge pull request #1265 from rspec/fix-load-order-issue
Fix load order issue
8b897e1
@cupakromer cupakromer Update gemspec capping Rails at 4.2
According to the Rails blog the 4.2 release is the last in the 4.x line.
Plans for Rails 5.x support are still in the works and may not be on
rspec-rails 3.x.

To inform users and prevent accidental usage this limits the allowed
Rails versions in the gemspec.

- http://weblog.rubyonrails.org/2014/12/19/Rails-4-2-final/
18a8760
Commits on Jan 01, 2015
@cupakromer cupakromer Merge pull request #1266 from rspec/limit-rails-versions
Update gemspec capping Rails at 4.2
5a52c8b
Commits on Jan 02, 2015
@yujinakayama yujinakayama Fix error with inheritance of outer group's anonymous controller
This fixes an error raised with the following spec:

```
require 'rails_helper'

describe ApplicationController do
  controller do
    def index
      head status
    end
  end

  context 'when #status returns 200' do
    controller(controller_class) do
      def status
        200
      end
    end

    it 'returns status 200' do
      expect(get(:index).status).to eq(200)
    end
  end
end
```

and run:

```
$ bundle exec rspec
F

Failures:

  1) ApplicationController when #status returns 200 returns status 200
     Failure/Error: Unable to find matching line from backtrace
     ArgumentError:
       '#<class:0x007fdad27a6340>' is not a supported controller name. This can lead to potential routing problems. See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use
     # /Users/me/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/mapper.rb:249:in `default_controller_and_action'
     # /Users/me/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/mapper.rb:117:in `normalize_options!'
     # /Users/me/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/mapper.rb:65:in `initialize'
```
f4c3b50
@cupakromer cupakromer Merge pull request #1260 from rspec/fix-error-with-anonymous-controll…
…er-inheritance

Fix error with inheritance of outer group's anonymous controller
90d21b4
Commits on Jan 08, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev) 5a5b294
@JonRowe JonRowe Merge pull request #1271 from rspec/update-travis-build-scripts-2015-…
…01-07-for-master

Updates from rspec-dev (2015-01-07)
787a502
Commits on Jan 09, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev) 7dbecab
@cupakromer cupakromer Merge pull request #1272 from rspec/update-travis-build-scripts-2015-…
…01-08-for-master

Updates from rspec-dev (2015-01-08)
f2af9a2
Commits on Jan 13, 2015
@cupakromer cupakromer Fix failing cuke with new rspec-core changes. 4555156
@cupakromer cupakromer Merge pull request #1278 from rspec/fix-failing-spec-suite
Fix failing cuke with new rspec-core changes.

[ci skip]
87396b7
Commits on Jan 15, 2015
@cupakromer cupakromer Prepare to support Ruby 2.2 on Rails 3.2.22+
This is in preparation for the next patch release. Similar steps are
being taken by Rails core. See:

rails/rails@8f92edb
8f50415
Commits on Jan 16, 2015
@cupakromer cupakromer Turn off Test::Unit's autorun.
Test::Unit "helpfully" sets up autoload for its `AutoRunner`.  While we
do not use reference it directly, when we load the `TestCase` classes
from ActiveSupport, AS kindly references `AutoRunner` for everyone.

We need to pre-emptively load 'test/unit' and make sure the version
installed has `AutoRunner` (the 3.x line does so far). If so, we turn it
off.
e53c23e
@cupakromer cupakromer Update change log with issue.
Fix grammar in code comment.

[ci skip]
70190b8
@cupakromer cupakromer Merge pull request #1277 from rspec/support-ruby-2-2-on-rails-3-2
Prepare to support Ruby 2.2 on Rails 3.2.22+
0cf76eb
Commits on Jan 17, 2015
@cupakromer cupakromer Load our adapters and extensions first.
Ensure that our adapters and extensions are early in the load process.
This way we can be sure that all adjustments to the Rails libs are
available when we our code that depends on Rails.
685567d
@cupakromer cupakromer Include details on how to run against `master`.
A very common issue is when a user attempts to run against the `master`
branch. Simply pointing to `master` doesn't work. This adds the steps
necessary to use `master`.

We need all of the repos in order to also satisfy any other gems which
may have a dependency on the `rspec` gem.

[ci skip]
ecc7cad
@cupakromer cupakromer Merge pull request #1280 from rspec/help-for-running-master
Include details on how to run against `master`.
b17d143
@brkane brkane Update RailsVersions.md with recent Rails versions
Updating with recent Rails versions.

[ci skip]
1de1aa2
@cupakromer cupakromer Cache bundle directory.
This also re-orders the listing of the settings to align with the
`rspec-dev` order. This makes manually comparing the files easier.
6de5f9e
Commits on Jan 18, 2015
@cupakromer cupakromer Merge pull request #1283 from rspec/update-travis-settings
Cache bundle directory.
d22459f
@cupakromer cupakromer Merge pull request #1281 from rspec/load-order-update
Load our adapters and extensions first.
b982c23
@brkane brkane Add entry for Rails 4.2 to RailsVersions.md 2b743e3
@cupakromer cupakromer Merge pull request #1285 from brkane/railsversions-doc-update
Update RailsVersions.md with recent Rails versions

[ci skip]
a04bcad
@JonRowe JonRowe use new rspec-mocks feature to verify active_record columns 7df9542
@JonRowe JonRowe move active record configuration into separate file ac3be97
Commits on Jan 19, 2015
@JonRowe JonRowe Merge pull request #1238 from rspec/verifying_doubles_on_rspec_rails
Make `instance_double` et al work with ActiveRecord columns.
0fb5483
Commits on Jan 23, 2015
@tinynumbers tinynumbers If a view example's description contains no path elements, then do no…
…t attempt to load a helper based on the example description.
155dda5
Commits on Jan 29, 2015
@cupakromer cupakromer Update Changelog with #1238. [ci skip] bf77c3a
@cupakromer cupakromer Update Changelog description. [ci skip] 3f87031
Commits on Feb 01, 2015
@mikeastock mikeastock Change type meta tag in templates to Hash 1.9 syntax
Added a feature check that uses the Rails version to decide if we can
use 1.9 hash syntax for our generatored specs
a3a45f2
Commits on Feb 02, 2015
@oliveiraethales oliveiraethales Update directory structure documentation
The website docs were not considering that request specs could also be
located inside a folder named 'integration' or 'api'.
9b95757
@cupakromer cupakromer Merge pull request #1293 from oliveiraethales/doc-update-requests-dir
Update directory structure documentation [ci skip]
e151115
@cupakromer cupakromer Merge pull request #1292 from mikeastock/hash_1_9_syntax_template
Change type meta tag in templates to Hash 1.9 syntax
03f28f8
@cupakromer cupakromer Update Changelog with #1292. [ci skip] b1ceb0c
@cupakromer cupakromer Remove unnecessary code :skull:
The matchers no longer attempt to use `AssertionFailedError` instead
they use `ActiveSupport::TestCase::Assertion`.

Fix #1294
f9676ae
@cupakromer cupakromer Merge pull request #1295 from rspec/fix-issue-1294
Remove unnecessary code :skull:
7af543c
@cupakromer cupakromer Remove extra "when" [ci skip] ffb5ed7
Commits on Feb 03, 2015
@myronmarston myronmarston Update changelog for v3.2.0 [ci skip] 8274f5f
@myronmarston myronmarston Release 3.2.0 c953d18
@myronmarston myronmarston Bump version to 3.3.0.pre 99b1a6c
Commits on Feb 09, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev) 1ae479c
Commits on Feb 10, 2015
@cupakromer cupakromer Add missing `require` to RSpec generator root
Fix #1301.

This fixes an issue where Rail's autoload does not find it in some
environments.
d40216e
@cupakromer cupakromer Merge pull request #1303 from rspec/update-travis-build-scripts-2015-…
…02-08-for-master

Updates from rspec-dev (2015-02-08)
f4bf5ed
@JonRowe JonRowe Merge pull request #1305 from rspec/fix-generator-dep
Add missing `require` to RSpec generator root
caf9d62
Commits on Feb 13, 2015
@tonyta tonyta adds test for be_routable matcher description 70f29f5
@davydovanton davydovanton Replace &block in arguments to yield construction ffea148
@tonyta tonyta defines BeRoutableMatcher#description
overrides RSpec::Matchers::BuiltIn::BaseMatcher#description to
return the description "be routable" instead of "be routable matcher"
a5042e1
Commits on Feb 14, 2015
@JonRowe JonRowe Merge pull request #1310 from tonyta/define-be_routable-description
Fix `be_routable` description -- Defines BeRoutableMatcher#description
67c6bac
@JonRowe JonRowe changelog for #1310
[skip ci]
515ed7f
Commits on Feb 21, 2015
@lucasmazza lucasmazza Relax `rails` dependency constraint to support the `4.2.x` releases.
The previous constraint would only go as up as `4.2.0`, thus making `rspec-rails`
incompatible with any of the patch releases of the rails 4.2.x series.
3e2606f
@cupakromer cupakromer Merge pull request #1318 from lucasmazza/lm-rails-4-2-1
Relax `rails` dependency constraint to support the `4.2.x` releases.
b541ac2
@cupakromer cupakromer Update Changelog with #1318.
[ci skip]
64434ff
@cupakromer cupakromer Disable the test-unit gem autorunner.
For some reason the test-unit gem loads it's autorunner by default.
Though the test-unit included with Ruby does not. The original code for
loading test-unit pre-dates widespread usage of the test-unit gem.

We took care of disabling the autorunner for Ruby 2.2+ since the
test-unit gem is now required for Rails 3.2. For older Ruby versions we
attempt to only load the `test/unit/assertions` module. When using the
`test-unit` gem however, Rails will auto require it for us, which loads
the main test-unit code, thus enabling the autorunner.
07df6bb
@cupakromer cupakromer Patch PR is merged, re-require this combination
[ci skip]
c238b91
Commits on Feb 23, 2015
@cupakromer cupakromer Merge pull request #1320 from rspec/disable-test-unit-gem-autorunner
Disable the test-unit gem autorunner.
f32c986
Commits on Feb 24, 2015
@myronmarston myronmarston Forwardport 3.2.1 release notes.
[ci skip]
8ca1675
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
2c81286
Commits on Feb 25, 2015
@voxik voxik Fix permissions. e73ad26
@cupakromer cupakromer Merge pull request #1324 from voxik/fix-presmissions
Fix permissions.
6d1b893
Commits on Mar 08, 2015
@biow0lf biow0lf Add PATCH HTTP method to scaffold routing generator. f964779
Commits on Mar 09, 2015
@JonRowe JonRowe Merge pull request #1336 from biow0lf/add_patch_method_to_scaffold_ro…
…uting

Add PATCH HTTP method to scaffold routing generator
6c8247e
@JonRowe JonRowe changelog for #1336
[skip ci]
0f4fa56
Commits on Mar 10, 2015
@cupakromer cupakromer Merge pull request #1308 from davydovanton/yield
Replace excess &block in arguments to yield construction
e28cb1a
@cupakromer cupakromer Add #1308 to the changelog [ci skip] a7ad3a0
@cupakromer cupakromer Include the benchmark from #1308. [ci skip] 6e014a9
@cupakromer cupakromer Merge pull request #1323 from rspec/update-travis-build-scripts-2015-…
…02-24-for-master

Updates from rspec-dev (2015-02-24)
9b15746
Commits on Mar 16, 2015
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
1f64130
@JonRowe JonRowe Merge pull request #1338 from rspec/update-travis-build-scripts-2015-…
…03-15-for-master

Updates from rspec-dev (2015-03-15)
df9bbc0
Commits on Mar 18, 2015
@cupakromer cupakromer Merge pull request #1289 from tinynumbers/view-example-helper-class-bug
If a view example's description contains no path elements, then do not attempt to load a helper based on the example description.
03afd47
@cupakromer cupakromer Update CHANGELOG [ci skip] f5af60f
@cupakromer cupakromer Fix action mailer preview path setup.
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.
172813d
@cupakromer cupakromer Add fix to changelog [ci skip] f61100e
@cupakromer cupakromer Merge pull request #1327 from rspec/update-action-mailer-railtie
Fix action mailer preview path setup.
fba0669
Commits on Apr 09, 2015
@orien orien Check `need_auto_run=` method is defined also 6092959
Commits on Apr 12, 2015
@orien orien extract `disable_testunit_autorun` method ffed381
Commits on Apr 15, 2015
@jgorset jgorset Provide a summary for humans d49058e
@JonRowe JonRowe Merge pull request #1354 from jgorset/patch-1
Provide a summary for humans
f1295b7
Commits on Apr 16, 2015
@cupakromer cupakromer Merge pull request #1350 from orien/test_unit_method
Check `need_auto_run=` method is defined also
32f0618
@cupakromer cupakromer Update changelog with issue #1350 [ci skip] a09a623
Commits on May 05, 2015
@JonRowe JonRowe Updated travis build scripts (from rspec-dev)
5c96e08
@gabetax gabetax Add JobExampleGroup to support :type => :job b40cda6
Commits on May 06, 2015
@JonRowe JonRowe Merge pull request #1360 from rspec/update-travis-build-scripts-2015-…
…05-05-for-master

Updates from rspec-dev (2015-05-05)
5d323ed
@gabetax gabetax only mix RailsExampleGroup into JobExampleGroup if ActiveJob is defined af53b75
@gabetax gabetax only initialize JobExampleGroup if ActiveJob is defined 79ff968
Commits on May 07, 2015
@JonRowe JonRowe Merge pull request #1361 from gabetax/infer_spec_type_for_jobs
Add JobExampleGroup to support :type => :job
316ddeb
@JonRowe JonRowe changelog and cleanup for #1361
[skip ci]
0ba1ad2
Commits on May 08, 2015
@jfvanderwalt jfvanderwalt fix: spelling of convenience in README.
5ab11b1
@cupakromer cupakromer Merge pull request #1364 from jfvanderwalt/jv-fix-spelling-error-in-r…
…eadme

fix: spelling of convenience in README.

[ci skip]
2beffdc
Commits on May 23, 2015
@cupakromer cupakromer Fix load order :bug:
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.
11ba7f7
@cupakromer cupakromer Update spec to remove hooks.
This changes to nearly mirrors how the configuration is tested in rspec-core.
Instead of setting up a new configuration object each test run, we clone
the existing object. This does two things:

- prevents polluting the actual test configuration
- instead of creating a new configuration it clones the existing one to
  ensure we actually modify the RSpec config
b78356f
@cupakromer cupakromer Add specs around existing settings
These specs are in a more integration style; instead of a more
unit-collaborator approach which would simply ensure that the proper
messages were sent to the configuration object.

The reason is that users of rspec-rails have specific expectations on
how the configuration options are available. If rspec-core changes
anything related to these calls that will break the rspec-rails user's
expectations. To ensure that doesn't happen we are fully testing the
integration between our shim and the `RSpec.configuration`.
b81f6de
@cupakromer cupakromer Prep for removal of fixture support globally.
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.
fd00f38
@cupakromer cupakromer Use default `.rspec` configuration. 98c161f
@cupakromer cupakromer Note updates in changelog.
[ci skip]
278972d
Commits on May 24, 2015
@josephgrossberg josephgrossberg consistent quoting, more readable interpolation 8197094
@JonRowe JonRowe Merge pull request #1375 from josephgrossberg/patch-1
consistent quoting, more readable interpolation
192da8a
Commits on May 25, 2015
@cupakromer cupakromer Merge pull request #1372 from rspec/update-fixture-support
Update fixture support
479d2d0
@cupakromer cupakromer Include `rspec:request` generator.
This includes a generator for "request" specs. There already exists a
generator which creates these specs, but it is called "integration".
The existing name comes from the legacy implementations attempting to
mirror the Rails test style names for the RSpec equivalent specs.

Since these two generators are identical, except for the name, this
makes the new `RequestGenerator` a subclass of the existing
`IntegrationGenerator`. Alternatively, we could have decided to make
`RequestGenerator` the parent class, moving the existing functionality
into it. While this is arguably the "proper" way of thinking about the
generators, it could potentially break some existing applications; even
though these classes are marked `private`. There's no harm for now in
keeping semver compliant by making this generator additive.

Since the two generators are exactly the same this uses a shared example
to keep the specs in-sync.

Resolve #1377
66bb6a7
@cupakromer cupakromer Update existing generator specs.
This updates the existing generator specs:

- Remove old `require 'spec_helper'`; `.rspec` does this now
- Do not use the monkey patch version of `describe`
- Use the generator support macros for the shared common setup
5b10339
@cupakromer cupakromer Update changelog with `rspec:request` generator.
[ci skip]
33f42fc
@cupakromer cupakromer Make yard available in the test environment
This fixes the error generated by the script when attempting to check
documentation coverage:

> /.gem/ruby/2.2.2/gems/bundler-1.9.4/lib/bundler/rubygems_integration.rb:316:in `block in replace_bin_path': can't find executable yard (Gem::Exception)
>         from bin/yard:16:in `<main>'
2c31ce1
@cupakromer cupakromer Achieve 100% doc coverage
Both of these are meant to be private APIs. They were not marked as such
before because the `bin/yard` command was failing previously.
2345fcb
@cupakromer cupakromer Address yard warnings
> [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
a640902
@cupakromer cupakromer Reach minimal 100% doc coverage.
This addresses doc coverage issues with the most recent release of YARD.
cd67b84
@JonRowe JonRowe Merge pull request #1378 from rspec/add-request-generator
Add request generator
e692909
Commits on May 26, 2015
@cupakromer cupakromer Fix `controller` attribute access.
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.
03d8cbe
@cupakromer cupakromer Merge pull request #1379 from rspec/address-yard-issues
Address yard issues
57d26eb
Commits on May 27, 2015
@cupakromer cupakromer Prevent running in production mode by default.
Many setups start tests by truncating the database tables. Running the
specs in production would, horribly, would delete all of the data. This
checks to make sure Rails is not in production before loading
rspec-rails and the configuration. If production mode is detected the
run will abort immediately.

Resolve #1382
b913f6a
@cupakromer cupakromer Update changelog with new `rails_helper` check.
[ci skip]
5d27de7
@cupakromer cupakromer Merge pull request #1383 from rspec/include-production-check
Prevent running in production mode by default.
a2a37ee
Commits on May 28, 2015
@takiy33 takiy33 Removed deprecated option from .gemspec
0017b92
@cupakromer cupakromer Merge pull request #1384 from takiy33/takiy33-patch-1
Removed deprecated option from .gemspec

[ci skip]
18ec8f5
Commits on Jun 03, 2015
@myronmarston myronmarston Forwardport 3.2.2 release notes.
[ci skip]
7bb6ea4
Commits on Jun 04, 2015
@cupakromer cupakromer Expose broken `ActionMailer` preview setup.
This fixes the spec suite to expose issues with `ActionMailer` being
configured incorrectly when previews are not available.

This addresses several issues:

- The incorrect configuration options are only exposed once
  `ActionMailer::Base` is loaded; this forces the class to load in the
  mailer initializer and at the end of our script
- This adds specs specifically for the "development" environment which
  were missing before; it appeared that by not setting the environment
  it would default to "development" per the script, however, when the
  command shells out the `RAILS_ENV` is already set to "test" from rspec
  running.

  To be certain we cover the other possible edge cases we specifically
  add more tests for `ActionMailer` not being available, and for a
  custom configuration being set after `rspec-rails` is loaded.
- Despite us asking Rails to turn off eager loading in our custom
  script, several files were still getting eager loaded; this
  explicitly clears the eager load paths to stop this
- This fixes how the mailer script is shelled out in Ruby 1.8.7; now the
  environment variables are properly formatted and standard error is
  piped to standard out

Exposes the regression issue in #1386
9522842
@cupakromer cupakromer Fix regression issue with `preview_path=`
The `preview_path` feature of `ActionMailer` was added in Rails 4.1.
Versions before that release are not able to handle that configuration.
The regression issue occurred in part to the spec suite overlooking
changes to the environment and how that affects the shelling out.

Additionally, the previous changes noted that the configuration for a
particular module always responds to a setting; even when it should not.
However, while this logic was noted for `show_previews`, a few lines
further down, that same logic was overlooked for `preview_path`.

It appears the only available methods for detecting `ActionMailer`, and
it's features, is tasting the top-level `config` in addition to checking
the Rails version string.
729b1db
@cupakromer cupakromer Update changelog with `preview_path=` fix
[ci skip]
adaf823
Commits on Jun 05, 2015
@cupakromer cupakromer Improve comment
Provide a more accurate description of the behavior we are avoiding and
why the current behavior is used.

[ci skip]
09c0ce1
@JonRowe JonRowe Merge pull request #1388 from rspec/fix-regression-mailer-preview-path
Fix regression mailer preview path
e9fb455
Commits on Jun 08, 2015
@myronmarston myronmarston Forwardport 3.2.3 release notes.
[ci skip]
2fb5619
Commits on Jun 12, 2015
@myronmarston myronmarston Updates changelog for v3.3.0 [ci skip] 3419999
@myronmarston myronmarston Release 3.3.0 bd11b95
@myronmarston myronmarston Bump version to 3.4.0.pre. cdc7711
Commits on Jun 13, 2015
@myronmarston myronmarston Fix regression with stubbing ActiveRecord model classes.
Fixes #1394.
See also rspec/rspec-mocks#972.
4e8c36c
@cupakromer cupakromer Include acceptance specs for smoke app
Add an acceptance spec to the smoke app verifying that neither
rspec-rails nor rspec-mocks has broken working models. This ensures the
following basic functionality:

- stubbing model class methods
- attribute methods (currently the only dynamic AR type method we support)
811e1cb
@myronmarston myronmarston Merge pull request #1395 from rspec/fix-ar-stubbing
Fix regression with stubbing ActiveRecord model classes.
d0447fa
Commits on Jun 14, 2015
@myronmarston myronmarston Forwardport 3.3.1 release notes.
[ci skip]
5ee901f
Commits on Jun 16, 2015
@JonRowe JonRowe ignore rspec persistance file e298fa5
@JonRowe JonRowe prevent define_attribute_methods from running on abstract classes
2ebc177
@JonRowe JonRowe Merge pull request #1396 from rspec/fix_abstract_class_allow
Fix verified partial doubles with abstract classes.
f270e29
Commits on Jun 18, 2015
@JonRowe JonRowe refactor rspec-mocks callback to only run on active record subclasses…
… without respond_to checks
d46e4f3
@JonRowe JonRowe Merge pull request #1398 from rspec/alternate_callback
Refactor verifying doubles callback
503a404
@myronmarston myronmarston Forwardport 3.3.2 release notes.
[ci skip]
1fb6f9f
Commits on Jul 03, 2015
@dankohn dankohn Namespace check shouldn't fail on symbols; fixes #1412
Fixes #1412 by converting symbols to strings in check.
40350d8
Commits on Jul 06, 2015
@JonRowe JonRowe Merge pull request #1414 from spreemo/dankohn-symbol-namespace-1412
Namespace check shouldn't fail on symbols; fixes #1412
be695b0
@JonRowe JonRowe changelog for #1414
[skip ci]
d856f64
Commits on Jul 10, 2015
@myronmarston myronmarston Ignore specs.out since our build scripts produce that as an artifact.…
… [ci skip]
eeab7d2
@myronmarston myronmarston Updated common markdown files (from rspec-dev) [ci skip] f2dd11b
@myronmarston myronmarston Merge pull request #1418 from rspec/update-common-markdown-files-2015…
…-07-09-for-master

Updates from rspec-dev (2015-07-09)
98b4a2d
@myronmarston myronmarston Updated travis build scripts (from rspec-dev)
b917f1d
Commits on Jul 15, 2015
@myronmarston myronmarston Forwardport 3.3.3 release notes.
[ci skip]
1e55b0f
Commits on Jul 25, 2015
@myronmarston myronmarston Updated common markdown files (from rspec-dev) [ci skip] 8e0226c
Commits on Jul 27, 2015
@cupakromer cupakromer Merge pull request #1419 from rspec/update-travis-build-scripts-2015-…
…07-10-for-master

Updates from rspec-dev (2015-07-10)
2ab21c3
@cupakromer cupakromer Merge pull request #1422 from rspec/update-common-markdown-files-2015…
…-07-24-for-master

Updates from rspec-dev (2015-07-24)
a189fcf
@cupakromer cupakromer Update travis to specify specific branches to run.
This moves the Travis CI config inline with the rest of the RSpec repos.
This will also help reduce the load on the Travis system for rspec-rails
PRs when the PR branch is a branch in the repo itself.
781cba1
@cupakromer cupakromer Merge pull request #1423 from rspec/update-travis
Update travis to specify specific branches to run.
926e670
Commits on Jul 28, 2015
@myronmarston myronmarston Updated common markdown files (from rspec-dev) [ci skip] 69671f8
@myronmarston myronmarston Merge pull request #1425 from rspec/update-common-markdown-files-2015…
…-07-27-for-master

Updates from rspec-dev (2015-07-27)
b756783
Commits on Jul 31, 2015
@jamelablack jamelablack Update README.md
[ci skip]
f2229f1
@jamelablack jamelablack Rename code_of_conduct.md to CODE_OF_CONDUCT.md
[ci skip]
93d1a85
@cupakromer cupakromer Merge pull request #1431 from jamelablack/patch-1
Update README.md
735c5f0
@cupakromer cupakromer Merge pull request #1432 from jamelablack/patch-2
Rename code_of_conduct.md to CODE_OF_CONDUCT.md
20103af
@cupakromer cupakromer Update links in readme. 4fbb4aa