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
Commits on Jul 07, 2012
@dchelimsky dchelimsky improve automation for publishing to relishapp.com 3a4d16b
Commits on Jul 08, 2012
@urkle urkle add feature example of alternative usage of errors_on d798e70
Commits on Jul 21, 2012
@alindeman alindeman Merge pull request #570 from urkle/errors_on
add feature example of alternative usage of errors_on
b7a6db0
Commits on Jul 26, 2012
@dchelimsky dchelimsky dev: fix inclusion of custom Gemfile 10de3e3
@dchelimsky dchelimsky ci: bump to latest rails versions 24b0f3c
Commits on Jul 27, 2012
@dchelimsky dchelimsky ci: update git-sourced dependencies for master and 2-3-stable 274ae67
Commits on Jul 30, 2012
Jordan Goldstein Include require 'spec_helper' in README code examples, fixes #581 72ceb3c
Commits on Aug 01, 2012
@henrik henrik Clarify when webrat/capybara autoloading applies.
Since I got it wrong: #360
3622324
@dchelimsky dchelimsky Merge pull request #585 from henrik/patch-1
Clarify when webrat/capybara autoloading applies.
f8ab2ba
Commits on Aug 03, 2012
@dchelimsky dchelimsky Add should and should_not to CollectionProxy
- Fixes #588.
- Fixes #445.
abfd0fc
Commits on Aug 05, 2012
@dchelimsky dchelimsky dev: update dev dependencies 4187a26
@dchelimsky dchelimsky Revert "Add should and should_not to CollectionProxy"
This reverts commit abfd0fc.
f9ebca7
Commits on Aug 06, 2012
@myronmarston myronmarston A better fix for CollectionProxy#should.
- Delay the fix so that users can configure a different expectation framework.
- Handle the right class for rails 3.0 (AssociationProxy) and 3.1+ (CollectionProxy).

- Fixes #588.
- Fixes #445.
6b4b5cf
@myronmarston myronmarston A couple fixes from @dchelimsky's comments. 48a0d0c
@banyan banyan Accept namespace with double-colon 909af09
Commits on Aug 07, 2012
@alindeman alindeman Merge pull request #591 from banyan/namespace-with-double-colon
Accept namespace with double-colon
506ca41
@alindeman alindeman Changelog for #591
[ci skip]
d818afe
@alindeman alindeman README uses expect() syntax 9324260
@alindeman alindeman Merge pull request #582 from mrjordangoldstein/master
Include require 'spec_helper' in README code examples, fixes #581
e60f6e2
@alindeman alindeman Features use new expect() syntax a65ff6e
@alindeman alindeman Merge pull request #593 from rspec/features_use_expect_syntax
Features use new expect() syntax
1ff5c96
@dchelimsky dchelimsky ci: run against rails-3.2.8.rc2 8d3ab42
@alindeman alindeman Merge pull request #592 from rspec/readme_uses_expect_syntax
README uses expect() syntax
fb55955
Commits on Aug 18, 2012
@jonhyman jonhyman Checking for existence of ActiveRecord in proxy.rb before getting con…
…stants from it.
780c42b
@dchelimsky dchelimsky only add should[_not] to ActiveRecord classes if AR defined 07d6a1a
@dchelimsky dchelimsky Revert "only add should[_not] to ActiveRecord classes if AR defined"
This reverts commit 07d6a1a.
faf8736
@dchelimsky dchelimsky Merge pull request #599 from jonhyman/feature/ar-check
Checking for existence of ActiveRecord in proxy.rb before getting constants from it.
928a3d2
Commits on Sep 08, 2012
@dchelimsky dchelimsky replace 'it "should' with 'it "does' (using should_clean gem) 69a63ce
Commits on Sep 11, 2012
@patmaddox patmaddox Update README w/ links to Factory Girl & Capybara 63d9abc
Commits on Sep 12, 2012
David Chelimsky Gemfile-custom updates 8c93c27
@woahdae woahdae Support validation contexts when using #errors_on
Previously, Model#errors_on calls Model#valid?, which will both clear
the errors hash and run validations in the default context. This adds an
:context option to #errors_on that gets passed to #valid?, allowing using
errors_on with validation contexts.

Exmaple usage:

    class Foo
      validates :name, length: {minimum: 20}, on: :publication
    end

    describe Foo
      it 'should have a name greater than 20 characters on publication' do
        subject.name = 'too short'
        subject.name.should have(1).error_on(:name, context: :publication)
      end
    end
8bedbf0
@alindeman alindeman Merge branch 'errors_on_with_validation_context' a875557
@alindeman alindeman Changelog for #605
[ci skip]
0b24f14
@alindeman alindeman Uses latest versions of Rails for CI 7a019a6
Commits on Sep 13, 2012
@alindeman alindeman Fixes name of ActiveRecord deprecated finders gem f48946e
@alindeman alindeman Installs bundler 1.2 on Travis which is required for Rails master 410ad03
@alindeman alindeman Reduces time needed to install/compile gems on @travis-ci 171f869
Commits on Sep 15, 2012
@alindeman alindeman Simply install the latest version of bundler f9d696b
@alindeman alindeman --trace runs of tests inside the sample app (debugging travis weirdness) bc5956a
@alindeman alindeman Fixes the build on Rails master
* `self.table_name=` has been preferred for a while (and supported since
  Rails 3.0.0); `set_table_name` is gone in Rails 4.
c771682
Commits on Sep 16, 2012
@alindeman alindeman Abort with non-zero exit status if any command fails 4dddd85
Commits on Sep 18, 2012
@agirorn agirorn Using contain in the View specs example is misleading because it does…
… not work without including an extra gem.
c268810
Commits on Sep 19, 2012
@dchelimsky dchelimsky Merge pull request #608 from agirorn/use_include_in_view_spec_example
Using contain in the View specs example is misleading.
be689da
Commits on Sep 24, 2012
@alindeman alindeman Scaffolded controller specs are compatible with Rails 4
* Rails 4 introduces
  [strong_parameters](https://github.com/rails/strong_parameters).
* If a model is scaffolded with attributes (e.g., `rails generate
  scaffold foo bar:string`), Rails will generate a controller that only
  accepts `bar`. This means that the controller spec must be aware of
  the specific parameters when sending PUT (update) requests.
* Furthermore if a model is scaffolded with attributes, Rails generates
  a controller that *requires* the #presence of attributes. This means
  we cannot send in an empty Hash, as the Rails framework will return a
  400 Bad Request.
86b0799
Commits on Sep 25, 2012
@alindeman alindeman Merge pull request #611 from alindeman/rails4
Scaffolded controller specs are compatible with Rails 4
87ebea1
Commits on Oct 01, 2012
@alindeman alindeman Adds example of using render_template in a view spec
* This is currently failing under Rails 4.0
6185a5d
@alindeman alindeman Correctly assign @gadgets so the view renders properly 8474e9d
Commits on Oct 04, 2012
@blowmage blowmage Remove unnecessary require
The rake task doesn't use core, and doesn't need the DSL loaded to work.
Having core loaded stomps on minitest if in the same project.
90f3302
@blowmage blowmage Update dependencies in the gemspec
Switch dependency away from 'rspec' because it loads core, which loads the DSL.
This change allows rspec-rails to live side-by-side with minitest-rails.
f5a5735
Commits on Oct 05, 2012
@dchelimsky dchelimsky Merge pull request #615 from blowmage/minitest-rails
Allow rspec-rails rake task to live with minitest-rails
0be66ba
Commits on Oct 06, 2012
@dchelimsky dchelimsky include Capybara::DSL and Capybara::RSpecMatchers in spec/features 9332167
@dchelimsky dchelimsky add RequestExampleGroup to specs in spec/api 1c9e2b7
@dchelimsky dchelimsky Changelog 0dbd908
@dchelimsky dchelimsky include RailsExampleGroup in spec/features (necessary when there is n…
…o AR)
a77de85
Commits on Oct 07, 2012
@alindeman alindeman Sets `#controller_path` in all versions of Rails
* Fixes #316
724578d
@alindeman alindeman Merge branch 'issue_316' 3214564
Commits on Oct 09, 2012
@alindeman alindeman Improves developer documentation 1f8b20d
@alindeman alindeman Be a little more forgiving when RAILS_VERSION or .rails-version does …
…not exist
1dd534b
Commits on Oct 12, 2012
@vanstee vanstee Identify ruby code for syntax highlighting
Fixes #617
78b151a
@alindeman alindeman Merge pull request #619 from vanstee/ruby_file_doc_strings
Identify ruby code for syntax highlighting
662c9c8
Commits on Oct 13, 2012
@alindeman alindeman Generated specs support module namespacing (e.g., in a Rails engine)
* Fixes #448
9ab382c
Commits on Oct 14, 2012
@dchelimsky dchelimsky add CAPYBARA.md a41a95b
@dchelimsky dchelimsky prep for 2.11.1 d568851
@dchelimsky dchelimsky need to add Capybara.md to .yardopts 3d54ead
@dchelimsky dchelimsky one more rename c5bdbfb
@dchelimsky dchelimsky better capy integration docs 6f551cd
@dchelimsky dchelimsky tweak capy integration docs 732e148
@dchelimsky dchelimsky gotta add files to gemspec too 2a1eac6
@dchelimsky dchelimsky OMG, DRY violations in docs - prep for 2.11.4 087f8f1
Commits on Oct 17, 2012
@jfirebaugh jfirebaugh Fix bare #render in view specs on Rails 3.1
656ff3 made this compatible with 3.2 by splitting the
name of the template in the description into its base
name, locale, format and handler components, but in
doing so broke compatibility with 3.1 and earlier,
which does not support the extra options.
5f869c1
Commits on Oct 20, 2012
@alindeman alindeman Merge pull request #624 from jfirebaugh/render_3.1
Fix bare #render in view specs on Rails 3.1
189fbdb
@alindeman alindeman Changelog for #624 [ci skip] b8392ac
@bjnord bjnord Removes AutoTest config/ exception
* Mappings for files under config/ will work
* Fixes #625
* Closes 627
738fd0d
Commits on Oct 24, 2012
@alindeman alindeman Adds custom failure messages for #be_new_record matcher
* Fixes #628
60b4c27
Commits on Oct 27, 2012
@alindeman alindeman A first stab of fixing `assert_template` in Rails 4 view specs
* It's relatively unobtrustive, but feels quite dirty. I'm hoping this
  is a temporary fix that produces feedback on something better.
601483f
@alindeman alindeman Capybara feature specs may use Rails URL helpers 96e1c33
@alindeman alindeman Documents how to customize `rake spec`
* Closes #521
00ee369
Commits on Nov 06, 2012
@jayeff jayeff Fix link to Capybara.md on rubydoc.info
reflect rename
7d478ee
@dchelimsky dchelimsky Merge pull request #633 from jayeff/master
Capybara.md was renamed, reflect this change in Changelog.md
4211c07
@alindeman alindeman Merge pull request #630 from alindeman/capybara_url_helpers
Capybara feature specs may use Rails URL helpers
fd25838
Commits on Nov 09, 2012
@TKAB TKAB Update Capybara.md
Fixed confusing type error.
a73dab4
@alindeman alindeman Merge pull request #634 from TKAB/patch-1
Really rspec-2.11.1 or rspec-rails-2.11.1
3865507
@alindeman alindeman Revert "Capybara feature specs may use Rails URL helpers"
This reverts commit 96e1c33.

* We'll instead use an implementation that adds a proper
  FeatureExampleGroup (see #632)
1152131
Commits on Nov 10, 2012
@jnicklas jnicklas Add example group for features
This fixes various issues with the integration between RSpec and Capybara 2.0.

- It includes Route helpers, these were previously unavailable, due to
  the fact that the only reason they are available in request spec is
  that those delegate via method_missing to an IntegrationTest instance.

- It adds the `:feature` type to all features. This way people can
  include module into `:type => :feature` examples and they will work
  when their specs are places in this folder.

David previously commented that he didn't want to add Capybara specific
behaviour outside of `rspec/rails/capybara`. I was careful to avoid
doing that. The feature example group does not explicitly include
Capybara, instead, Capybara is included due to Capybara itself hooking
into `:type => :feature`. This is much cleaner than the way it was
before.

I tested this against both a freshly generated Rails app, as well as an
existing, rather large project, both worked well.
0fda98b
Commits on Nov 11, 2012
@alindeman alindeman Adds cukes for feature specs (capybara integration) 6e68bdd
@alindeman alindeman Replaces `match` with `get`. `match` is removed in Rails 4 56473fd
Commits on Nov 12, 2012
@dchelimsky dchelimsky Add rails-2.3.9 to travis config a731794
Commits on Nov 13, 2012
@alindeman alindeman prep for 2.12 dcabc3a
@alindeman alindeman Wraps code in backticks
[ci skip]
623c362
@alindeman alindeman Updates cucumber feature for changes to ActiveRecord in Rails 4
* Rails 4 deprecates #scoped in favor of #all
1d9514f
@alindeman alindeman Updates to rake 10 as 0.9.3 introduces incompatibilities bbd6f36
@dchelimsky dchelimsky --trace is now --backtrace fb9eda1
@dchelimsky dchelimsky bump version to 2.12 edd4a73