Permalink
Browse files

words

  • Loading branch information...
1 parent a219711 commit b0a6f28f5b22d45afec889460e2dfd75ee369a0e @dchelimsky committed Mar 6, 2009
Showing with 32 additions and 18 deletions.
  1. +12 −3 History.txt
  2. +1 −4 README.txt
  3. +19 −11 Upgrade.markdown
View
15 History.txt
@@ -9,10 +9,19 @@ WARNINGS:
* require 'spec/test/unit' to invoke test/unit interop if you're using
RSpec's core (this is handled implicitly with spec-rails)
- * setup/teardown is gone - use before/after instead
+ * setup and teardown are gone - use before and after instead
- * you can still use setup/teardown if you're using Test::Unit::TestCase as
- the base ExampleGroup class (which is implicit in rspec-rails)
+ * you can still use setup and teardown if you're using
+ Test::Unit::TestCase as the base ExampleGroup class (which is implicit
+ in rspec-rails)
+
+ * The matcher protocol has been improved. The old protocol is still
+ supported, so as long as you're not monkey patching rspec's built-in
+ matchers, or using extension libraries that do, this should not affect
+ you. If you run into trouble, you'll just need to change:
+
+ * failure_message => failure_message_for_should
+ * negative_failure_message => failure_message_for_should_not
* All references to rubygems have been removed from within rspec's code.
View
5 README.txt
@@ -51,7 +51,4 @@ examples.
or
- git clone git://github.com/dchelimsky/rspec.git
- cd rspec
- rake gem
- rake install_gem
+ clone, build, install - See http://wiki.github.com/dchelimsky/rspec
View
30 Upgrade.markdown
@@ -9,17 +9,25 @@
* require 'spec/test/unit' to invoke test/unit interop if you're using
RSpec's core (this is handled implicitly with spec-rails)
-* setup/teardown is gone - use before/after instead
+* setup and teardown are gone - use before and after instead
+
+ * you can still use setup and teardown if you're using
+ Test::Unit::TestCase as the base ExampleGroup class (which is implicit
+ in rspec-rails)
+
+* The matcher protocol has been improved. The old protocol is still
+ supported, so as long as you're not monkey patching rspec's built-in
+ matchers, or using extension libraries that do, this should not affect
+ you. If you run into trouble, you'll just need to change:
+
+ * ``failure_message => failure_message_for_should``
+ * ``negative_failure_message => failure_message_for_should_not``
- * you can still use setup/teardown if you're using Test::Unit::TestCase as
- the base ExampleGroup class (which is implicit in rspec-rails)
-
* All references to rubygems have been removed from within rspec's code.
* See Ryan Tomayko's http://gist.github.com/54177 for rationale and
suggestions on alternative approaches to loading rubygems
-
## New Matcher DSL
We've added a new DSL for generating custom matchers very simply and cleanly.
@@ -28,11 +36,11 @@ that, but we recommend that you start developing your new matchers with this
new syntax.
Spec::Matchers.create do :be_a_multiple_of |smaller|
@mapmarkus
mapmarkus Mar 6, 2009

Did you mean?

Spec::Matchers.create :be_a_multiple_of do

- match do |bigger|
- bigger % smaller == 0
- end
- end
-
- 9.should be_a_multiple_of(3)
+ match do |bigger|
+ bigger % smaller == 0
+ end
+ end
+
+ 9.should be_a_multiple_of(3)
See features/matchers/create\_matcher\_.feature for more examples

1 comment on commit b0a6f28

@dchelimsky
Owner

Yep – fixed in 8a4f0ca203d4975bb78970cef86ca06bc5a9a76b

Please sign in to comment.