Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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 Mar 17, 2012
@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]
564487b
@dchelimsky dchelimsky Require kernel extensions (should) from block_aliases in case it is
loaded first.
e290fe3
@dchelimsky dchelimsky fix bug diffing single strings with multiline strings
07dd19c
@dchelimsky dchelimsky Revert "fix bug diffing single strings with multiline strings"
This reverts commit 07dd19c.
2c23be3
@dchelimsky dchelimsky better fix for bug when diffing multiline strings
e4d8dcb
@dchelimsky dchelimsky formatting tweaks in the changelog
0492d87
Commits on Mar 22, 2012
@justinko justinko Remove unnecessary "else" clause.
584e764
Commits on Mar 23, 2012
@justinko justinko Provide a helpful message if the diff between two objects is empty. F…
…ixes #123
e12a2d9
Commits on Mar 25, 2012
@dchelimsky dchelimsky Changelog for #125 [ci skip]
0458ac1
Commits on Mar 27, 2012
@myronmarston myronmarston Started working on yield matchers.
99456da
Commits on Mar 29, 2012
@myronmarston myronmarston Rename helper methods for yield matcher specs.
eb9d327
mirasrael Fix error with using custom matchers inside other custom matcher rspe…
77243d9
@dchelimsky dchelimsky Merge pull request #126 from mirasrael/master
Fix for error with using custom matchers inside other custom matchers
6fe6c9f
@dchelimsky dchelimsky changelog for #126
8f822b0
@dchelimsky dchelimsky tweak docstring #126 [ci skip]
e5cd722
Commits on Mar 30, 2012
@myronmarston myronmarston Match yielded args with == or ===.
Previously, this expectation failed:

  expect { |b| _yield_with_args(String, Fixnum, &b) }.to yield_with_args(String, Fixnum)

...because Class=== returns false when given itself.
72c5dae
@myronmarston myronmarston Provide better message for negative yield_with_args matcher failure.
f3923dd
@myronmarston myronmarston Group the yield examples by matcher.
1b106c4
mirasrael Fix using execution context methods in nested DSL matchers
- Fixes #127.
abba439
Commits on Mar 31, 2012
@myronmarston myronmarston Add yield_successive_args matcher.
23f5acb
mirasrael Fix RSpec::Matchers::DSL#define for compatibility with 1.8.x
21752df
mirasrael Fix naming
70dd175
@myronmarston myronmarston Fix typo: "yields", not "yeilds".
1897250
@myronmarston myronmarston Remove diffability from yield matchers for now.
I'm not sure it makes sense given that they don't match strictly but instead match using === or ==.
3c6a81e
@myronmarston myronmarston Fix yield matchers to handle instance_eval.
It's debatable if instance_eval'ing a block can be considered yielding, but it's important that we use local variables in the lambdas rather than instance variables, because we don't want to modify the state of the receiver of #instance_eval.
0e79594
@myronmarston myronmarston Raise an error if a yield matcher is used w/ an expect block that acc…
…epts no args.

The expect block must accept an arg, and pass it on to the method-under-test as a block, in order for these yield matchers to work properly.  Since this is atypical for an expect block, this error will help guide people when they use these matchers incorrectly.
66a2f01
@myronmarston myronmarston Add description to all yield matchers.
e969284
Commits on Apr 01, 2012
@myronmarston myronmarston Add API docs for yield matchers.
Cukes are still to come.
b94da8d
@justinko justinko Merge pull request #128 from mirasrael/master
Fix using execution context methods in nested DSL matchers
5ffc547
Commits on Apr 02, 2012
@dchelimsky dchelimsky Changelog for #128
[ci skip]
ca5cc09
@dchelimsky dchelimsky Change the be_within matcher to be inclusive of the delta.
- Fixes #131.
- This changes the way the matcher behaves, which is something we would
  generally avoid in anything but a major release, however we believe
  that this is the correct behavior and that this change is very unlikely
  to impact anybody negatively. Specifically:

  1. 17.4.should be_within(0.5).of(17) # used to pass and continues to pass
  2. 17.5.should be_within(0.5).of(17) # used to fail due to lack of inclusivity, but passes after this change
  3. 17.6.should be_within(0.5).of(17) # used to fail and continues to fail
  4. 17.4.should_not be_within(0.5).of(17) # used to fail and continues to fail
  5. 17.5.should_not be_within(0.5).of(17) # used to pass due to lack of inclusivity, but fails after this change
  6. 17.6.should_not be_within(0.5).of(17) # used to fail and continues to fail

  Scenario 2 used to fail, so it's unlikely to be present.
  Scenario 5 will result in new failures, but we believe that it is very unlikely to be used.
a9bf7ab
Commits on Apr 03, 2012
@dchelimsky dchelimsky bump to 2.9.1
f31ae96
@dchelimsky dchelimsky fix changelog
2cfed80
Commits on Apr 04, 2012
@dchelimsky dchelimsky need relish in the Gemfile to push relish docs
6fe2bca
@dchelimsky dchelimsky add doc files to .yardopts
[ci skip]
40cbc30
Commits on Apr 08, 2012
@jeremywadsack jeremywadsack Added start_with and end_with matchers for String
77a9ecc
@jeremywadsack jeremywadsack Added start_with and end_with support for Array
9b9946c
@jeremywadsack jeremywadsack Handle case when expected can't be indexed
ab1d055
@jeremywadsack jeremywadsack Rdoc for new matchers
d5fdf35
@jeremywadsack jeremywadsack Fix up whitespace
5f367d9
Commits on Apr 09, 2012
@dchelimsky dchelimsky Merge pull request #135 from jeremywadsack/start_with_end_with
Add matchers start_with end_with
05d9853
Commits on Apr 10, 2012
@myronmarston myronmarston Add cukes for yield matchers.
24335ee
@dchelimsky dchelimsky Change start_with and end_with matchers to take varargs.
- Clean up rdoc, features, and specs.
- Refactor the two matchers a bit.
- Add changelog.
- #135
2e0cdbc
@dchelimsky dchelimsky add start_with and end_with matchers to README [ci skip]
35d98aa
@myronmarston myronmarston Raise an error if expect block arg isn't passed on as a block.
Otherwise, the matcher is unable to detect anything about if the method-under-test yields, and the user may get false positives.
780655c
@myronmarston myronmarston Refactor yield matchers a bit.
This allows the YieldProbe to take care of defining the probe block, and simplifies the #matches? methods.
7a0e4bb
@myronmarston myronmarston Raise an error if a single-yield matcher is used with a multi-yield m…
…ethod.

Only the yield_successive_args matcher is designed for the multi-yield case.
f8c3c01
Commits on Apr 11, 2012
@myronmarston myronmarston Update the yield cukes with a few more/better examples.
d020cfe
Commits on Apr 17, 2012
@jeremywadsack jeremywadsack Added more helpful message when actual has #[] but does not support #…
…[0,3]

Pull request #135
5908107
@dchelimsky dchelimsky align usage of expect/to
3591cd2
@dchelimsky dchelimsky can't use 1.9 hash syntax in specs (still support 1.8) - #135
5bdf4b8
Commits on Apr 19, 2012
@myronmarston myronmarston Merge pull request #129 from rspec/yield_matchers
Yield matchers
e610e40
@myronmarston myronmarston Update changelog.
[ci skip]
429c672
Commits on Apr 20, 2012
@dchelimsky dchelimsky match_unless_raises accepts multiple args
- in support of fix for rspec/rspec-rails#530
a5a58aa
@jfirebaugh jfirebaugh Do not require exception messages to exactly match MRI
Different Ruby implementations deserve latitude in the error
messages, e.g. to provide more precise diagnostics than MRI.

In particular, do not rely on the fact that RuntimeError generated
by MRI when calling bare `raise` without a current exception has
an empty message. That is not the case on Rubinius; it is arguably
a bug in MRI.

Following this commit, all test pass on Rubinius head.
9fa523e
Commits on Apr 21, 2012
@dchelimsky dchelimsky Merge pull request #140 from jfirebaugh/rubinius
Do not require exception messages to exactly match MRI
b98f0ba
@dchelimsky dchelimsky Fix potential false-positive so that it will fail correctly if there …
…is a regression.

- See #140.
694cbf1
@dchelimsky dchelimsky Changlog for #140
780d4c2
@dchelimsky dchelimsky eliminate 'not initialized' warning on @matcher_execution_context
7c76204
@dchelimsky dchelimsky ci: run against rbx
1fdaedb
@dchelimsky dchelimsky Fix Changelog formatting [ci skip]
20c7a3c
@dchelimsky dchelimsky Changelog [ci skip]
f93ce4c
Commits on Apr 22, 2012
@dchelimsky dchelimsky shorten file extension
f315020
@dchelimsky dchelimsky align config files across rspec projects
fe40efd
@dchelimsky dchelimsky silence more warnings
5d8a233
@dchelimsky dchelimsky dev: align Gemfiles across rspec projects
15d96b8
Commits on May 01, 2012
@dchelimsky dchelimsky update yard to 0.8
97b5e0c
Commits on May 04, 2012
@dchelimsky dchelimsky update changelog for 2.10 release
77e1a09
@dchelimsky dchelimsky bump to 2.10.0
2e348ff