Skip to content


Subversion checkout URL

You can clone with
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.
Commits on Dec 23, 2011
@nicknovitski nicknovitski use RR's rspec2 adapter (re: issue #136) b4d8267
Commits on Jan 06, 2012
@dchelimsky dchelimsky doc/file listings/configs cd58cb1
@dchelimsky dchelimsky bump some dev deps and move their declarations to gemspec 88868ff
@dchelimsky dchelimsky ci: without without development 6f8feca
@dchelimsky dchelimsky dev: syntax gem is a dev dependency a7ebbb4
Commits on Jan 09, 2012
@dchelimsky dchelimsky (not txt) 47d7d0c
Commits on Jan 12, 2012
@dchelimsky dchelimsky Use sets defined once instead of arrays declared in line where order
doesn't matter.

Very minor perf improvement, evidence of which is either anecdotal
(rspec's suite appears to run about 0.1 second faster on average) or
assumed based on benchmarks posted at
@dchelimsky dchelimsky CONDITIONAL is more descriptive 7ce078e
Commits on Jan 13, 2012
@dchelimsky dchelimsky No need to override command line switches that don't accept false (e.g.

- Fixes $552.
Commits on Jan 16, 2012
@ineverov ineverov Require 'set' a89fb4d
Ivan Neverov Merge branch 'master' of git:// db5a740
@ineverov ineverov Remove to_set method call per d8af26e#commitcomment-861297 2b76e88
@dchelimsky dchelimsky Merge pull request #555 from ineverov/add_set_require
require 'set'
@dchelimsky dchelimsky remove unnecessary indirection bf848ec
@dchelimsky dchelimsky Ensure that values passed to `config.filter_run` are respected when
running over DRb (using spork).

- Fixes #554.
Commits on Jan 17, 2012
@dchelimsky dchelimsky Changelog for #554 e0de119
Commits on Jan 21, 2012
@exviva exviva Fix Cucumber deprecation warnings
This removes the following warning:

    WARNING: Using 'Given/When/Then' in step definitions
    is deprecated, use 'step' to call other steps instead
Commits on Jan 22, 2012
@justinko justinko Merge pull request #559 from exviva/fix_cucumber_warnings
Fix Cucumber deprecation warnings
Commits on Jan 25, 2012
@justinko justinko Ensure shared example groups are reset after a run (as example groups…
… are).
Commits on Jan 28, 2012
@uzzz uzzz base text formatter now displays "xx minute(s) xx seconds" if more th…
…an 60 seconds
Commits on Jan 29, 2012
@pyromaniac pyromaniac Now the both values are stored, but i.e. `controller` method, created…
… anonymouus controller in corresponding example group, redefines only :described_class, but later we try to get `described_class` it examples to instantiate anonymous controller and got :describes value. Described class chould be taken first.
@pyromaniac pyromaniac Added spec for patched case a4c33a5
Commits on Jan 30, 2012
@justinko justinko Merge pull request #563 from uzzz/master
Display both minutes and seconds of duration time when specs are finished.
@justinko justinko Pluralization support for runtime duration output (minute). 68a66de
@justinko justinko changelog a08eabc
@dchelimsky dchelimsky doc formatter strips whitespace from group and example descriptions 7db7f4b
@dchelimsky dchelimsky Changelog for prev commit 04d77ec
@justinko justinko Spec for RSpec::Core::World#reset 5c73b8c
@dchelimsky dchelimsky simplify spec for #reset
- See 5c73b8c
Commits on Jan 31, 2012
@dchelimsky dchelimsky ci: update rubygems if < 1.8 (needed for ZenTest in ree) 7e6dc98
@dchelimsky dchelimsky ci: before_script doesn't run before bundling, so no way to run again…
…st ree for now
@dchelimsky dchelimsky ci: one more try ... 311b525
@dchelimsky dchelimsky ci: it's before_install (RTFM) ff5e12f
@dchelimsky dchelimsky ci: it's gem, not rubygems bcdb6f4
@dchelimsky dchelimsky dev: need to include dev rspec in case dependent gems depend on rspec a4bff1c
Commits on Feb 02, 2012
@dchelimsky dchelimsky don't rescue from calling proc filters
- Closes #556.
@dchelimsky dchelimsky Changelog for #556 147a3a5
@dchelimsky dchelimsky it was rescue false, not rescue nil
- #556.
Commits on Feb 03, 2012
@sunaku sunaku at_exit: don't mask nonzero exit status due to $!
This change ensures that RSpec's at_exit handler doesn't mask (override)
any nonzero exit status, which can happen when Ruby is on it's way out
due to an uncaught exception ($!) such as a SyntaxError.

Please see this bug report for more information:

sunaku/tork#31 (comment)
Commits on Feb 04, 2012
@tomstuart tomstuart Fix autotest when RSpec executable path contains spaces b804c70
@dchelimsky dchelimsky Merge pull request #570 from tomstuart/rspec-executable-spaces
Autotest fails if RSpec executable path contains spaces
Commits on Feb 05, 2012
@dchelimsky dchelimsky Merge pull request #564 from pyromaniac/patch-1
Prefer described_class over describes
@dchelimsky dchelimsky Changelog for #564 c6dc90b
@dchelimsky dchelimsky Don't process filters when the metadata doesn't even have the key.
This allows us to simplify the filter_applies? method on metadata, and
gives us a small performance boost by not evaluating procs that would
always return false.

- Closes #556.
@dchelimsky dchelimsky fix copy/paste oversight b06bc35
Commits on Feb 10, 2012
@justinko justinko Merge pull request #569 from sunaku/patch-1
at_exit: don't mask nonzero exit status due to $!
@justinko justinko changelog aefb25c
Commits on Feb 16, 2012
@dchelimsky dchelimsky add note that explicit ref to subject is not recommended 5dc1872
Commits on Mar 04, 2012
@dchelimsky dchelimsky Don't include or extend when ancestor group is already extended.
- Fixes #576.
@dchelimsky dchelimsky Changelog for #576 9f425c2
@dchelimsky dchelimsky link to full dev changelog [ci skip] 2fa0741
@dchelimsky dchelimsky Fix #576 for Ruby 1.8 as well
Per benchmarks/check_inclusion, this:
  (class << host; self; end) < mod
is faster than this:
  (class << host; self; end).included_modules.include?(mod)

The faster version doesn't work in Ruby 1.8, so we use the slower
version in Ruby 1.8, but the faster version in 1.9:w
@dchelimsky dchelimsky run benchmarks against ruby 1.8 as well 6d75ce6
Commits on Mar 06, 2012
@dchelimsky dchelimsky remove spork-0.9 shim (0.9 has been released) dbf1d64
Commits on Mar 10, 2012
@justinko justinko Fix broken link. Closes #580 76cd682
Commits on Mar 12, 2012
@dchelimsky dchelimsky bump to 2.9.0.rc1 5b255ac
@dchelimsky dchelimsky don't forget rake 8d1eff9
@dchelimsky dchelimsky bump to 2.9.0.rc2 a4607d5
Commits on Mar 16, 2012
@dchelimsky dchelimsky add example for 'it { should_not matcher }'
There was a cuke, but no example.
@dchelimsky dchelimsky it { should matcher } delegates directly to ExpectationHandler.
Not only is this cleaner, but it also makes it feasible to turn of the
global 'should' (see #119).
@masarakki masarakki fix memorize of subject 54c0e18
Commits on Mar 17, 2012
@dchelimsky dchelimsky Merge pull request #582 from masarakki/master
Support false and nil subject
@dchelimsky dchelimsky Merge pull request #582 from masarakki/master
Support false and nil subject
@dchelimsky dchelimsky Beef up/clarified specs for #582.
Also refactored `its` a bit
@dchelimsky dchelimsky Changelog for #582 76fed28
@dchelimsky dchelimsky Beef up/clarified specs for #582.
Also refactored `its` a bit
@dchelimsky dchelimsky Changelog for #582 96e9d57
@dchelimsky dchelimsky bump to 2.9.0 52bbe9f
@dchelimsky dchelimsky Merge branch '2-9-maintenance' into temp
* 2-9-maintenance:
  bump to 2.9.0
  Changelog for #582
  Beef up/clarified specs for #582.
  Merge pull request #582 from masarakki/master

@dchelimsky dchelimsky dev: bump spork version to 0.9.0
[ci skip]
@dchelimsky dchelimsky dev: add a script to download ruby-debug-base19-0.11.26.gem and linec…
…ache19-0.5.13.gem to a local cache

[ci skip]
Commits on Mar 18, 2012
@preethiramdev preethiramdev Adding prepend before 15fa016
@preethiramdev preethiramdev Comments 70433f3
@preethiramdev preethiramdev Adding append_after, prepend_after, changes to after hooks storage an…
…d run method
@dchelimsky dchelimsky Hook collections are all the same now, so we only need one type. 76899a6
@dchelimsky dchelimsky rdoc tweaks for #579 d46c857
@dchelimsky dchelimsky provide a default ExampleGroup to eliminate conditionals running hooks 6999128
@dchelimsky dchelimsky refactor the [prepend|append]_[before|after] examples 9401cba
@dchelimsky dchelimsky Changelog for #579 f85d405
Commits on Mar 23, 2012
@justinko justinko Properly parse `SPEC_OPTS` options. Fixes #586 268eeb4
@dchelimsky dchelimsky add benchmark comparing v yield
[ci skip]
@dchelimsky dchelimsky example.description returns the location of the example if there is no
explicit description or matcher-generated description.

- Fixes #585.
Commits on Mar 24, 2012
@gswirski gswirski Fixed formatting of code examples in documentation.
Some `@example` tags were missing, I believe.
@dchelimsky dchelimsky Merge pull request #589 from sognat/patch-1
Fixed formatting of code examples in documentation.
@dchelimsky dchelimsky Changelog for #589 26e9548
@dchelimsky dchelimsky Use relative path for example.location. 107d676
@grosser grosser Do not modify example ancestry when dumping errors
This causes bugs (Notably that after blocks / transaction rollback is not executed properly)
when errors are dumped while examples are still running
as is done by [rspec-instafail]( and therefore fuubar formatter.
@dchelimsky dchelimsky Merge pull request #588 from grosser/preserve_ancestry_on_failure
Do not modify example ancestry when dumping errors
@dchelimsky dchelimsky Changelog for #588 [ci skip] fbe0e75
Commits on Mar 31, 2012
@dchelimsky dchelimsky beef up rdoc about let 78eb9e8
@dchelimsky dchelimsky more doc for subject method [ci skip] d39157b
@dchelimsky dchelimsky embrassed? seriously?
[ci skip]
Commits on Apr 04, 2012
@dchelimsky dchelimsky add doc files to .yardopts
[ci skip]
Commits on Apr 07, 2012
@dchelimsky dchelimsky add info to README about storing command line options in .rspec and a…
…utotest integration

[ci skip]
Commits on Apr 08, 2012
@dchelimsky dchelimsky remove unnecessary guard 62ae302
@dchelimsky dchelimsky Remove obsolete guard against building in ruby 1.9
[ci skip]
@dchelimsky dchelimsky prepend_before now prepends local hooks before global hooks.
- Provides support for rspec/rspec-rails#391.
- Also refactored the hooks infrastructure such that most of the work is
  done within the hooks module rather than spreading it out across its
  different consumers.
Commits on Apr 13, 2012
@moro moro refactor test, return identically same object from stubbed examples() b08810b
@moro moro prints ocuppied time of slow tests. 361cd64
@moro moro fix ZeroDivisionError when no test ran. 1708e15
@moro moro fix broken test fbe337e
Commits on Apr 16, 2012
@moro moro Improve result message. 9e8643d
Commits on Apr 18, 2012
@justinko justinko Merge pull request #602 from moro/display-slow-tests-occupied-time
Display slow tests occupied time
@justinko justinko Remove extraneous word. 4d9472e
@justinko justinko Fix for 1.8 1c0ce8d
@justinko justinko changelog [ci skip] a777f09
@justinko justinko JRuby is too fast!! (need to get an execution result time) 343c9e2
@justinko justinko line break [ci skip] a1cae36
@justinko justinko Handle zero execution time for profiling. This could happen if nothin…
…g is called in an example block.
@justinko justinko Attempt to get JRuby to report an execution time for profiling. 6c37ec5
Commits on Apr 20, 2012
@exviva exviva Fix warning
lib/rspec/core/subject.rb:91: warning: shadowing outer local variable - subject
@exviva exviva Fix a bunch of warnings
spec/rspec/core/example_spec.rb: warning: `-' after local variable
is interpreted as binary operator even though it seems like unary operator
@justinko justinko Merge pull request #603 from exviva/fix_warnings
Fix warnings
@eregon eregon raise an ArgumentError when the arity of a Proc filter is wrong
Otherwise the filter is not evaluated and considered to return nil
@myronmarston myronmarston Merge pull request #604 from eregon/filter-proc-arity
raise an ArgumentError when the arity of a Proc filter is wrong
@eregon eregon do not assume the user has the default progress formatter in its conf…
@myronmarston myronmarston Merge pull request #571 from eregon/formatter_config
Some tests depend on absence of formatter in ~/.rspec
Commits on Apr 21, 2012
@dchelimsky dchelimsky minor refactoring: extract method 999d04c
@dchelimsky dchelimsky dev: align use of FakeFS 8e816eb
Commits on Apr 22, 2012
@dchelimsky dchelimsky Changelog formatting tweak [ci skip] 36f6e22
@dchelimsky dchelimsky don't need file list in .yardopts 1359ae2
@dchelimsky dchelimsky dev: align Gemfiles across rspec projects 7eaa1f6
Commits on Apr 23, 2012
@jarmo jarmo fixes #396 2ea6f20
Commits on Apr 26, 2012
@dchelimsky dchelimsky make append_before and prepend_after aliases of before and after 18e452d
Commits on Apr 27, 2012
@dchelimsky dchelimsky minor refactoring and making private things private c98d538
Commits on May 01, 2012
@dchelimsky dchelimsky update yard to 0.8 9d8a6cc
Commits on May 02, 2012
@dblock dblock Shellsplitting input in -O. 531c0a6
Commits on May 03, 2012
@dchelimsky dchelimsky Merge pull request #610 from dblock/shellsplit-dahs-o
Shellsplitting input in custom options file.
Commits on May 04, 2012
@dchelimsky dchelimsky update changelog for 2.10 release 89c44ef
@dchelimsky dchelimsky bump to 2.10.0 95bf11b
@dblock dblock Ported support for mutliple -e options from #596. 2f88804
Commits on May 06, 2012
@dchelimsky dchelimsky dev: remove obsolete filter 1ad7087
@dchelimsky dchelimsky dev: clean up some specs b1b2ae6
Commits on May 08, 2012
@dchelimsky dchelimsky `config.mock_with` and `config.expect_with` yield custom config object
to a block if given

This supports decoupled config for other rspec and 3rd party libs.

    RSpec.configure do |c|
      c.expect_with ExpectationFramework do |other_framework_config|
        other_framework_config.custom_setting = true
      c.mock_with OtherFramework do |other_framework_config|
        other_framework_config.custom_setting = true
@dblock dblock A prettier implementation via @justinko. dc33f77
Commits on May 09, 2012
@dchelimsky dchelimsky rdoc format [ci skip] a0202ea
Commits on May 13, 2012
@justinko justinko Merge pull request #614 from dblock/multiple-eees
Allow specifying multiple -e (--example) options
@justinko justinko changelog [ci skip] 1004353
Commits on May 16, 2012
@dchelimsky dchelimsky spec refactoring: replace subject with intention revealing name e343cba
@dchelimsky dchelimsky Support a 'name' arg to subject declaration
Closes #619.


    describe Article do
      subject(:article) { }
      it { supports_one_liners }
      it "supports intention revealing name" do
        article.should do_something
@dchelimsky dchelimsky more Changelog for #619 [ci skip] 19e1eaf
@dchelimsky dchelimsky doc tweaks [ci skip] #619 5ea6d86
Commits on May 18, 2012
@dchelimsky dchelimsky RSpec.reset resets filters
- Fixes #621
@dchelimsky dchelimsky Revert "RSpec.reset resets filters"
This reverts commit ba15a2e.
@dchelimsky dchelimsky RSpec.reset reinits configuration and world
- Fixes #621 (for realz)
@dchelimsky dchelimsky Changelog for #621 c9b8681
@slyphon slyphon call #to_s on exception_message before calling #split
When 1.8.7 is shutting down its threads, and you're stuck in a Monitor,
it will eventually raise a SystemExit, and that SystemExit may have an
instance of Exception as its `#message` (instead of a String) which
causes the formatter to blow up.
@slyphon slyphon causes rspec without #622 to raise NoMethodError 6ab7614
@dchelimsky dchelimsky Merge pull request #622 from slyphon/dump_failure_info_fix
call #to_s on exception_message before calling #split
Commits on May 19, 2012
@dchelimsky dchelimsky RDoc improvements for shared examples, Example, and Procsy.
Also did some minor refactoring in order to be able to use Yard to
document internal-DSL-generated methods like `it`, `example`, and
@dchelimsky dchelimsky Changelog for #622 [ci skip] 1482bfe
@dchelimsky dchelimsky Fix typo in changelog: Grzegorz M-E~Zwirski [ci skip] 18aacf7
@dchelimsky dchelimsky Revert "Fix typo in changelog: Grzegorz M-E~Zwirski [ci skip]"
It was correct before - just looked wrong in my editor.

This reverts commit d342861.
@dchelimsky dchelimsky Changelog after 2.10.1 release [ci skip] 03b72af
@dchelimsky dchelimsky Changelog - link url [ci skip] acf2fdf
@dchelimsky dchelimsky rdoc - use the {name} syntax for links [ci skip] d024dc9
Commits on May 20, 2012
@justinko justinko Merge pull request #605 from jarmo/bug_396
fixes #396
@justinko justinko Use File::ALT_SEPARATOR if it is not nil (it is on nix systems). 1d49eb6
@justinko justinko Only run windows specific specs if on the windows OS.
travis-ci will be supporting multiple OS's in the future.
@justinko justinko Remove redundant logic. 2a7fafb
@justinko justinko changelog 3705abd
@dchelimsky dchelimsky Re-reformat failure message.
Fixes cuke broken by 43ec3a8 caused
by reformatting a file, which accidentally re-indented a HERE doc.
Commits on May 22, 2012
@myronmarston myronmarston Don't silence 2nd exceptions.
When an example raises an error and an after or around hook also raises an error, the 2nd error was being silenced, since `set_exception` was a no-op when the exception was already set.  Silencing errors is bad, so we should print the error instead.

See for the issue that triggered this change.
@myronmarston myronmarston Update changelog. 0b34e42
Commits on May 23, 2012
@myronmarston myronmarston Improve on 27059bf.
* Fix specs. The `should_receive(:message).with(/.../)` wasn't working as passed even if the message text didn't match the regex.
  I figured out that it was because of the fact that the error was being
  raised within the example-under-test, which already had two errors and
  was simply printing (or, previously, silencing) the extra error.  The
  solution is to capture the reported message using a stub implementation,
  and then assert on it after running the example.
* The added context ("in an after hook") for 2nd errors happening in an
  after hook wasn't being included in the printed message. This is fixed now.
Commits on May 25, 2012
@brynary brynary Add Code Climate badge e2cc637
@dchelimsky dchelimsky Merge pull request #623 from brynary/codeclimate-badge
Add Code Climate badge
Commits on May 27, 2012
@justinko justinko Merge pull request #443 from nicknovitski/patch-2
use RR's rspec2 adapter (re: issue #136)
@justinko justinko Revert "Merge pull request #443 from nicknovitski/patch-2"
This reverts commit ea668aa, reversing
changes made to 8010fc3.
@dchelimsky dchelimsky minor refactoring: reduce duplication in hooks module 6837910
@dchelimsky dchelimsky remove some unnecessary conditionals 894dd4c
@dchelimsky dchelimsky Add travis-ci badge to README 80bb038
@dchelimsky dchelimsky fix typo in README [ci skip] 553608e
@dchelimsky dchelimsky README tweaks 7bfe871
Commits on May 31, 2012
@dchelimsky dchelimsky refactor: move some hooks behavior to Hooks module 0592aca
Commits on Jun 04, 2012
@dchelimsky dchelimsky use `define_method` instead of `let` for named subject
`subject` already memoizes the value
@dchelimsky dchelimsky `include_examples` and `include_context` now accept a customization b…

- Closes #615.
@dchelimsky dchelimsky run share_examples_for examples against shared_examples and shared_co…
Commits on Jun 06, 2012
@myronmarston myronmarston Delay the loading of DRB.
- Most of the time users don't use DRB. This'll speed up the start time a bit
  by not unnecessarily loading it when it's not used.
- Apparently jruby 1.7.0-preview1 loads the delegate library when DRB is loaded [1][2].
  This causes expectations on delegate objects to fail because `should` never gets added
  to them. By delaying when delegate gets loaded, it allows a user to load
  `rspec/expectations` and then `delegate` and ensure it works.

[1] rspec/rspec-expectations#148 (comment)
[2] The backtrace at the point delegate is loaded:
/Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:1:in `require'
/Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:1:in `(root)'
/Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:57:in `require'
/Users/myron/.rvm/rubies/jruby-head/lib/ruby/1.9/drb/drb.rb:57:in `(root)'
/Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:1:in `require'
/Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:1:in `(root)'
/Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:1:in `(root)'
file:/Users/myron/.rvm/rubies/jruby-head/lib/jruby.jar!/jruby/kernel19/kernel.rb:1:in `(root)'
file:/Users/myron/.rvm/rubies/jruby-head/lib/jruby.jar!/jruby/kernel19/kernel.rb:19:in `require'
file:/Users/myron/.rvm/rubies/jruby-head/lib/jruby.jar!/jruby/kernel19/kernel.rb:19:in `require_relative'
/Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core.rb:4:in `require'
/Users/myron/.rvm/gems/jruby-head/gems/rspec-core-2.10.1/lib/rspec/core.rb:4:in `require_rspec'
/Users/myron/.rvm/gems/jruby-head/bin/rspec:23:in `load'
/Users/myron/.rvm/gems/jruby-head/bin/rspec:23:in `(root)'
@hynkle hynkle fix typo 3215ad0
@justinko justinko Merge pull request #630 from hynkle/typo
fix typo
Commits on Jun 09, 2012
@dchelimsky dchelimsky Bump version to 2.10.1
This was done already before the 2.10.1 release, but only on the 2-10
maintenance branch.
@alindeman alindeman `--require` is merged among different configuration sources
* e.g., `--require` specified in SPEC_OPTS will be merged with
  `--require` specified in `.rspec`
* Fixes #594
@alindeman alindeman Changelog for #594 [ci skip] d89c87b
Commits on Jun 11, 2012
@myronmarston myronmarston Merge pull request #629 from rspec/delay-drb-loading
Delay the loading of DRB.
@alindeman alindeman -I is merged among configuration sources 5f730b0
Commits on Jun 15, 2012
@dchelimsky dchelimsky remove dead code 18903e1
Commits on Jun 16, 2012
@myronmarston myronmarston Don't add `describe` to every object.
Instead, make it only available on:
  - The main object--so it can be used at the top level.
  - Modules--so example groups can be declared nested
    within modules, as is the common practice.

Besides this, the only other place we need describe is from within
example groups (so we can nest them), and this is taken care of by

I got the idea for this from a recent change in Sinatra that similarly
limits the DSL to just the main object rather than all objects: