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 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 May 09, 2012
@myronmarston myronmarston Add support for `expect(value)` syntax.
Note: there's more to do here (documentation, etc); this is just a starting point for discussion and comments.
@myronmarston myronmarston Don't expose #target as a public API.
Also, fix the spelling of the class while I'm at it.
@myronmarston myronmarston Add configuration API for choosing an expectation syntax.
:should, :expect or both can be chosen.
@myronmarston myronmarston Don't redefine should or expect when re-configured. ad2a757
Commits on May 10, 2012
@myronmarston myronmarston Refactor enabling/disabling of expectation syntaxes.
* Fix build on JRuby. Our sandboxing via forking didn't work
  on JRuby since fork isn't available. On JRuby we just
  re-enable all syntaxes at the end of each sandboxed example.
* Testing this revealed that the way I was restoring a disabled
  syntax didn't always work. Based on the random order, sometimes
  spec/rspec/matchers/be_spec.rb:427 would fail with
  "TypeError: bind argument must be an instance of Kernel".
* Refactored main logic into new syntax module, that can add
  the syntaxes to any class or module. Kernel/RSpec::Matcher
  defaults are provided for convenience. This also fixes the
  bind failure, by redefining the methods anew rather than
  re-binding the old ones.
@myronmarston myronmarston Prevent operator matchers from new expect syntax. 6de81c7
Commits on May 11, 2012
@myronmarston myronmarston We can't count on hash ordering. use an array of tuples instead.

Closes #144.
@myronmarston myronmarston Cleanup code a bit.
- Remove bang from @justinko rightly pointed out, there's no corresponding bangless method so it didn't really follow convention here.
- Use an early guarded return.
Commits on May 12, 2012
@myronmarston myronmarston Add yard docs for new modules.
[ci skip]
@myronmarston myronmarston Add match_array matcher method for the old =~ array matcher.
This is needed because we've decided not to support operator matchers off of `expect(value).to`, and `match_array` is the best name we've come up with for it.
Commits on May 13, 2012
@dchelimsky dchelimsky Remove obsolete spec
- it wasn't running because it was dynamically bound to classes that
  were no longer being found.
- it was specifying an age-old protocol that isn't used by
  rspec-expectations, so it would never be used.
Commits on May 17, 2012
@zhangsu zhangsu Fix confusing error message in `be_within`
This is a patch for the following issue:


It is possible to have duck typing for numerical operations, but the minus
sign is often used for other operations as well such as the set
difference that Array#- performs. In that case, even if it does not fail
on the :- method, it will probably fail on the subsequent :abs and :<=
@justinko justinko Merge pull request #145 from zhangsu/master
Fix confusing error message in `be_within`
@justinko justinko Clearer error message for previous commit. d55d9a8
@justinko justinko Make "validation" methods for the be_within matcher class private. 1cac6bc
@justinko justinko changelog 605a520
Commits on May 21, 2012
@dchelimsky dchelimsky dev: update Guardfile to run everything when matchers change c450e3d
@dchelimsky dchelimsky refactor BeWithin to be more self-contained.
More explicit and consistent in dealing with instance variables rather
than relying on knowledge of how BaseMatcher handles them.
@dchelimsky dchelimsky minor refactoring: use implicit return 123169e
Commits on May 22, 2012
@dchelimsky dchelimsky dev: --backtrace 4c4c8dc
@dchelimsky dchelimsky refactor built-in matchers
Removed default initialize and matches? from the BaseMatcher and added
explicit initialization where needed.
@dchelimsky dchelimsky Fix some cukes broken by the previous matcher refactoring (messages c…
@myronmarston myronmarston Merge pull request #119 from rspec/expect_syntax
Add support for `expect(value)` syntax.
@myronmarston myronmarston Update changelog. f9574db
@myronmarston myronmarston More changelog updates. 9793323
Commits on May 25, 2012
@brynary brynary Add Code Climate badge 99fb8ce
@dchelimsky dchelimsky Merge pull request #146 from brynary/codeclimate-badge
Add Code Climate badge
Commits on Jun 05, 2012
@myronmarston myronmarston Add more docs on syntax configuration.
Closes #149.
Commits on Jun 07, 2012
@justinko justinko Use `eq` instead of `==` for built-in matcher failure message. 43526ec
Commits on Jun 14, 2012
@dchelimsky dchelimsky put the rdoc for should, should_not, and expect where yard can pick i…
…t up
Commits on Jun 15, 2012
@myronmarston myronmarston Add `should` and `should_not` to BasicObject on 1.9.
For #114.
@myronmarston myronmarston Add #add_should_and_should_not to configuration API.
This allows users to manually add these methods to proxy objects that do not have them.

Closes #114.
@myronmarston myronmarston Update changelog.
[ci skip]
Commits on Jun 20, 2012
@dchelimsky dchelimsky refactor matchers to use BaseMatcher's initialize and matches? methods 4024344
Commits on Jun 23, 2012
@dchelimsky dchelimsky Change BaseMatcher to a class.
It was a module, but it was really acting as a base class (it was even
in the name).

Very slightly more efficient (see benchmarks/include_v_superclass.rb)
Commits on Jun 25, 2012
@dchelimsky dchelimsky ensure the eq matcher sends :== to actual (not expected) a3e2839
Commits on Jul 07, 2012
@dchelimsky dchelimsky add travis badge to README adaaa9b
@dchelimsky dchelimsky space, the final frontier b394f47
@dchelimsky dchelimsky bump to 2.11.0 45161a7