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-expectations
...
head fork: rspec/rspec-expectations
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Jul 08, 2012
@dchelimsky dchelimsky loosen time constraint for be_within example 79febad
Commits on Jul 10, 2012
@dchelimsky dchelimsky enhance rdoc for expect syntax ebd8a4c
@dchelimsky dchelimsky tweak README (expect syntax) d5417f9
Commits on Jul 13, 2012
@myronmarston myronmarston Remove the hacky search for should_not in backtrace.
It wasn't working for the `expect { .. }.to` syntax, anyway.
9814ab2
@myronmarston myronmarston Loosen error message constraints for raise_error matcher specs.
This is in prep for #59--once I had some backtrace info, all of these would fail since they are doing exact string matches.
2c2fdb6
Commits on Jul 17, 2012
@alexcoplan alexcoplan add support for coloured diffs dbe5aa3
@alexcoplan alexcoplan fixed coloring, added tests for colored diff 54b9e98
@alexcoplan alexcoplan tests now stub color config, removed setter in config 505db9f
@alexcoplan alexcoplan no magic nums, yellow->green for insertions 477fac1
@alexcoplan alexcoplan fixed chr grabbing for older rb implementations 83cdba4
Commits on Jul 18, 2012
@myronmarston myronmarston Merge pull request #157 from alexcoplan/color_diffs
Colored Diffs
3b4f60c
@myronmarston myronmarston Update changelog. 067f13d
Commits on Jul 19, 2012
@dchelimsky dchelimsky move post-2.11.1 enhancements in changelog 024002c
Commits on Jul 25, 2012
@ggilder ggilder #159: Revise should(_not) to work with MacRuby 9c9619b
@myronmarston myronmarston Merge pull request #160 from ggilder/master
#159: Revise should(_not) to work with MacRuby
d51bf72
@myronmarston myronmarston Add change log entry for #160. 147f710
@alindeman alindeman Be defensive about resolving `Object`
It'd be pretty crazy for there to be an `RSpec::Object` or
`RSpec::Expectations::Object,` but 1) Ruby's constant resolution rules
have changed and I don't always remember them and 2) We were originally
defensive about it.
3cacdde
Commits on Jul 26, 2012
@myronmarston myronmarston Cherry-pick 2.11.2 release stuff from 2-11-maint branch. c897a47
Commits on Jul 27, 2012
@myronmarston myronmarston Ensure #== is defined on build in matchers so that they can be composed.
For example:

expect {
  user.emailed!
}.to change{user.last_emailed_at}.from(nil).to be_within(1.second).of(Time.zone.now)

Closes #161.
d427bac
Commits on Aug 25, 2012
@alexcoplan alexcoplan use same color config method as core 94fce05
@alexcoplan alexcoplan improve diff coloring code 248004e
@alexcoplan alexcoplan revert to using static color methods 7cdd88b
@myronmarston myronmarston Merge pull request #169 from alexcoplan/better_diff_coloring
Better diff coloring
f4d4cd0
Commits on Aug 26, 2012
@myronmarston myronmarston Run all specs together and in isolation for build.
We want them to be able to pass when run in isolation w/o bundler being loaded.
b0d5007
@myronmarston myronmarston Fix ruby warnings.
/Users/myron/code/rspec-dev/repos/rspec-expectations/lib/rspec/matchers/dsl.rb:8: warning: method redefined; discarding old ignore
/Users/myron/code/rspec-dev/repos/rspec-expectations/lib/rspec/matchers/dsl.rb:8: warning: previous definition of ignore was here
a8d9014
@myronmarston myronmarston Improve how we find the path to the rspec exe.
On travis, it found `/home/travis/builds/rspec/exe/rspec`,
and that didn't exist. I'm not sure why it didn't find the
one in rspec-core, but I think this'll fix it.
cafef45
@myronmarston myronmarston Revert recent build change -- it's not working on Travis CI.
I need to head to bed in a bit and I don't want to leave the build
broken. I'll put this in a branch and play with it there to
get it to work.

- Revert "Improve how we find the path to the rspec exe."
  This reverts commit cafef45.
- Revert "Run all specs together and in isolation for build."
  This reverts commit b0d5007.
aa4530d
Commits on Sep 05, 2012
@myronmarston myronmarston Fix and deprecate `expect { }.should` syntax.
Fixes #170.
b89b8c5
@myronmarston myronmarston Add missing changelog entry I forgot to add.
This was fixed in d427bac.
016aece
@myronmarston myronmarston Add 2.11.3 release info. cf6cf5d
Commits on Sep 06, 2012
@myronmarston myronmarston Fix full changelog URL. d5e6e36
Commits on Sep 08, 2012
@dchelimsky dchelimsky run should_clean gem (it "does ... v it "should ...) 3c0e7ea
Commits on Sep 10, 2012
@myronmarston myronmarston Fix and re-enable the test_all build.
I had previously attempted to add this in b0d5007 but find_path_to_rspec_exe wasn't quite right.

Travis installs rspec-core as a :git gem so the path is `.../rspec-core-<sha>/lib`, not `.../rspec-core/lib`.
46d5347
@myronmarston myronmarston Use stub_const rather than hand-rolled const mutation.
This also fixes a warning I was getting on the 1.8.7 build:

rspec-expectations/spec/rspec/matchers/have_spec.rb:13: warning: redefine pluralize
d0773b1
Commits on Sep 12, 2012
David Chelimsky whitespace 60a58ec
David Chelimsky update Gemfile-custom 66ad37c
David Chelimsky more custom Gemfile updates d3d8672
Commits on Sep 27, 2012
@samphippen samphippen Make the include matcher require the key to exist in the hash.
There was a weird case where {}.should include(:something => nil) would
pass, Myron suggested we make this not the case. Here's a patch that
does that

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
04eb38d
@myronmarston myronmarston Fix typo. cfaf6b5
Commits on Oct 01, 2012
@myronmarston myronmarston Allow rbx-19mode build to fail (for now).
We've been getting a strange failure on rbx-19 that I can't reproduce locally:

https://travis-ci.org/#!/rspec/rspec-expectations/jobs/2583529
8c7cc53
@alindeman alindeman Tests specifically for ability to use ::RSpec.configuration, not ::RS…
…pec::Core

* It is possible for RSpec::Core to be defined, but not be fully loaded
  enough for RSpec.configuration to be accessible because
  rspec-core.gemspec requires 'lib/rspec/core/version' which defines
  RSpec::Core::Version but nothing else.
e20978f
Commits on Oct 03, 2012
@alindeman alindeman Document inline code samples with backticks
* Hopefully prevents relishapp from considering the _ as italics
4c0dfd7
Commits on Oct 04, 2012
@alindeman alindeman Fixes the build on rbx
* rbx confusingly raises a NoMethodError in the error case described in
  `access_running_example.feature`. MRI and JRuby raise NameError.
  Because matching exactly isn't super-important, let's just match less
  stringently on the error message.
32a1feb
@myronmarston myronmarston Fixup documentation output of configuration specs. 1644904
Commits on Oct 09, 2012
@myronmarston myronmarston Include backtrace in errors reported by `raise_error` matcher.
It's hard to troubleshoot unexpected errors when the backtrace is silenced,
as it was previously.

Closes #59.
4a919ab
@myronmarston myronmarston Merge pull request #177 from rspec/issue_59
Include backtrace in errors reported by `raise_error` matcher.
16a133f
@myronmarston myronmarston Allow rbx builds to fail.
    
We're getting weird sudden regressions on rbx, and given the frequency of
RBX updates (and recent experience with failing rbx bulids in VCR and other
rspec repos), I think it's due to a bug in rbx.
2f1595f
Commits on Oct 12, 2012
@vanstee vanstee Identify ruby code for syntax highlighting
Fixes #178
733e5d8
@alindeman alindeman Merge pull request #180 from vanstee/ruby_file_doc_strings
Identify ruby code for syntax highlighting
5bb512a
Commits on Oct 13, 2012
@myronmarston myronmarston Rbx builds are passing now thanks to @alindeman.
rspec/rspec-core@96e3d13
rspec/rspec-core@582a0a8

Revert "Allow rbx builds to fail."

This reverts commit 2f1595f.
e4eee95
Commits on Oct 16, 2012
@alindeman alindeman Build on JRuby --1.9 32799c0
@alindeman alindeman Scopes documentation gems and avoids installing them on Travis f4e53a9
@dchelimsky dchelimsky README - recommend eq over == 13d69c3
@alindeman alindeman JRuby --1.9 is green c8ddb5e
Commits on Oct 17, 2012
@samphippen samphippen Warn if the "message" param passed to a should is not a string 518a0f7
@myronmarston myronmarston It's a warning, not an error. 0e706c6
@myronmarston myronmarston Improve wording of warning. a6365b0
@myronmarston myronmarston Cleanup whitespace. cd196c5
@myronmarston myronmarston Update changelog. f4f2a29
Commits on Oct 21, 2012
@myronmarston myronmarston Use `hide_const` at a place where we really just want to hide a const…
…ant.
f88feba
Commits on Oct 23, 2012
@myronmarston myronmarston Cleanup whitespace. e2ef482
@rentalcustard rentalcustard Fix generated docstring when Class#inspect changed a5eb047
@rentalcustard rentalcustard Remove some unnecessary test code 2a39025
@rentalcustard rentalcustard Don't leak a class out of the spec 275d585
Commits on Oct 26, 2012
@rentalcustard rentalcustard Use stub_const to have a user class and show intent fffa5d5
@rentalcustard rentalcustard Remove no-longer-relevant comment 071710a
Commits on Oct 27, 2012
@samphippen samphippen Make the error message more useful when using match_array
* Now the error message will let you know if you're trying to match an
  array against something that isn't an array-like thing.
* Closes #186
* Fixes #185
e2a9e3f
@myronmarston myronmarston Merge pull request #184 from mortice/implicit-docstring-for-instance-…
…of-matcher

Fix generated docstring for BeAnInstanceOf when Class#inspect changed
d5d073e
@myronmarston myronmarston Update changelog.
[ci skip]
83d9cd2
Commits on Nov 09, 2012
@nanocity nanocity Use 'empty?' instead of 'any?' and 'none?' in order to match 'nil' an…
…d 'false' as argument values
3d9ae80
@alindeman alindeman Merge pull request #187 from nanocity/yield_arguments
Use 'empty?' instead of 'any?' and 'none?' to match 'nil' and 'false'
f8a8065
Commits on Nov 13, 2012
@dchelimsky dchelimsky prep for 2.12 [ci-skip] d353e8b
@alindeman alindeman Updates to rake 10 c780529
@dchelimsky dchelimsky bump version to 2.12 ef6882e
@alindeman alindeman Fixes changes link 5baacca
Commits on Dec 04, 2012
@alindeman alindeman OperatorMatcher considers ancestor chain
* Related #191
e5e5a74
Commits on Dec 05, 2012
@myronmarston myronmarston Merge pull request #192 from alindeman/operator_registry_considers_an…
…cestors

OperatorMatcher considers ancestor chain
abefb76
Commits on Dec 06, 2012
@myronmarston myronmarston Provide a clear failure message when using `{}.should =~ {}`.
The match_array matcher (delegated to by `=~` for enumerables) is
not meant to be used for hashes, but the `should =~` syntax doesn't
make that obvious. Previously, you would get a failure like:

     Failure/Error: actual.should =~ actual
       expected: {:foo=>"bar"}
            got: {:foo=>"bar"} (using =~)

...which is pretty confusing. Our `match_array` matcher already
includes handling for invalid arguments (such as hashes) to return
a clear failure message, but it wasn't being used for an expression
like `{}.should =~ {}` because it was only registered as an operator
matcher for `Array`. This changes it so that it is registered as an
operator matcher for any Enumerable. This improves the failure message
for enumerable types like hash and set, but on its own, it could cause
breakage for things like 1.8 strings that are Enumerable but also
define a reasonable `=~`.  The fix here changes the operator matcher
delegation logic so that it only delegates to the registered matcher
if the object has the generic Kernel implementation of the operator.
If it has a more specific implementation, we assume the user actually
wants to match using the given operator itself.

Fixes #191.
c7a91af
@myronmarston myronmarston Merge pull request #193 from rspec/hash_match_array_failure
Provide a clear failure message when using `{}.should =~ {}`.
cf52fe6
@stevenharman stevenharman Cleanup whitespace b36e3ca
@stevenharman stevenharman Allow custom matchers to use #match built in
Addresses problem with dispatching the #match matcher from within a
custom matcher. (Wow... what a mouthful) See Issue #188.
6442118
@stevenharman stevenharman Add explaination about why we alias #match c956506
Commits on Dec 07, 2012
@myronmarston myronmarston Merge pull request #194 from stevenharman/issue_188_custom_matchers_w…
…ith_match

Allow custom matchers to use built-in #match
7fe9ec4
Commits on Dec 16, 2012
@myronmarston myronmarston Run travis builds against ruby 2.0. 2e14988
@myronmarston myronmarston 2.12.1 release. a71fe2f