Skip to content

Comparing changes

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

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Commits on Dec 23, 2011
@nicknovitski nicknovitski use RR's rspec2 adapter (re: issue #136) b4d8267
Commits on Apr 23, 2012
@jarmo jarmo fixes #396 2ea6f20
Commits on May 01, 2012
@alexch alexch formatters run better when $SAFE mode is on
Setting $SAFE=3 causes some file operations to raise a SecurityError. This patch allows you to run in SAFE mode without those SecurityErrors masking the real errors raised by the code under test and/or by RSpec matcher failures.

I extracted the SAFE setting/resetting logic into a helper method called "safely" since it's called from several places.
@alexch alexch improve rdoc comments in BaseFormatter f87b634
@alexch alexch basic JsonFormatter 972591b
Commits on May 04, 2012
@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.
@alexch alexch add command-line 'j' or 'json' formatter option dcfaa67
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:

Commits on Jun 21, 2012
@dchelimsky dchelimsky refactoring: alias prepend and append on HookCollection
- a bit more OO
- one less conditional per hook registration
@dchelimsky dchelimsky Merge pull request #609 from alexch/json-formatter
JSON formatter
@dchelimsky dchelimsky Changelog for #609 [ci skip] cfb465f
@dchelimsky dchelimsky Revert "Merge pull request #609 from alexch/json-formatter"
Failed in ci build for 1.8.7, jruby, ree

This reverts commit 8e41f1a, reversing
changes made to 076d683.
@dchelimsky dchelimsky Restore "Merge pull request #609 from alexch/json-formatter""
Most of the commits with this merge are fine - only one is causing failures
in some rubies - we can deal with that issue separately.

This reverts commit 359cd38.
@dchelimsky dchelimsky Revert "formatters run better when $SAFE mode is on"
This is causing failures in Ruby 1.8.7, jruby, and ree

This reverts commit 576b82d.
@dchelimsky dchelimsky Revert "Revert "formatters run better when $SAFE mode is on""
This reverts commit 713ad6f.
@dchelimsky dchelimsky Revert "Merge pull request #609 from alexch/json-formatter"
This reverts commit 8e41f1a, reversing
changes made to 076d683.
Commits on Jun 29, 2012
@dchelimsky dchelimsky Add `config.order = 'random' to the generated spec_helper.
- Closes #635
@dchelimsky dchelimsky don't need redcarpet when running in jruby b5354ef
Commits on Jul 04, 2012
@dchelimsky dchelimsky delegate instead of alias from mocha adapter 2c60898
Commits on Jul 07, 2012
@dchelimsky dchelimsky refactor: rename method f1e2024
@dchelimsky dchelimsky update Changelog baf4c31
@dchelimsky dchelimsky bump to 2.11.0 f9ed7ab