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-core
base: v2.10.0
...
head fork: rspec/rspec-core
compare: limit_monkey_patching_of_describe
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 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
      end
      c.mock_with OtherFramework do |other_framework_config|
        other_framework_config.custom_setting = true
      end
    end
651d8d9
@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
22e689c
@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.

Example:

    describe Article do
      subject(:article) { Article.new }
      it { supports_one_liners }
      it "supports intention revealing name" do
        article.should do_something
      end
    end
2e20683
@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
ba15a2e
@dchelimsky dchelimsky Revert "RSpec.reset resets filters"
This reverts commit ba15a2e.
2d61d16
@dchelimsky dchelimsky RSpec.reset reinits configuration and world
- Fixes #621 (for realz)
e8eae4d
@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.
2d39c46
@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
0d26b06
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
`specify`.
43ec3a8
@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.
254e7c9
@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
d7c250a
@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.
e675bc3
@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.
3c1ed24
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 https://github.com/myronmarston/vcr/issues/167#issuecomment-5814249 for the issue that triggered this change.
27059bf
@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
  expected...it 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.
d0cb324
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
8010fc3
Commits on May 27, 2012
@justinko justinko Merge pull request #443 from nicknovitski/patch-2
use RR's rspec2 adapter (re: issue #136)
ea668aa
@justinko justinko Revert "Merge pull request #443 from nicknovitski/patch-2"
This reverts commit ea668aa, reversing
changes made to 8010fc3.
5090cc3
@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
f87dfbf
@dchelimsky dchelimsky `include_examples` and `include_context` now accept a customization b…
…lock.

- Closes #615.
092a9c6
@dchelimsky dchelimsky run share_examples_for examples against shared_examples and shared_co…
…ntext
4feeec6
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)'
3646611
@hynkle hynkle fix typo 3215ad0
@justinko justinko Merge pull request #630 from hynkle/typo
fix typo
41a8efb
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.
2cf3b45
@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
9518119
@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.
9a79082
@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
RSpec::Core::ExampleGroup.describe.

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:

sinatra/sinatra@46bdb7d
b45c10e