Permalink
Browse files

prep for 1.3.0

  • Loading branch information...
1 parent d494e19 commit 87ab55434fe5b5338e2d2362f34666e9142ea05c @dchelimsky committed Jan 12, 2010
Showing with 55 additions and 25 deletions.
  1. +1 −1 History.rdoc
  2. +1 −1 License.txt
  3. +2 −2 Manifest.txt
  4. +2 −3 README.rdoc
  5. +47 −16 Upgrade.rdoc
  6. +2 −2 lib/spec/version.rb
View
@@ -1,4 +1,4 @@
-=== development (in git)
+=== Version 1.3.0 / 2010-01-11
* enhancements
* capture ExpectationNotMet error by default in matcher DSL
View
@@ -1,6 +1,6 @@
(The MIT License)
-Copyright (c) 2005-2009 The RSpec Development Team
+Copyright (c) 2005-2010 The RSpec Development Team
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -68,6 +68,7 @@ features/expectations/expect_error.feature
features/extensions/custom_example_group.feature
features/formatters/custom_formatter.feature
features/formatters/nested_formatter.feature
+features/interop/cucumber_stubs_dont_leak.feature
features/interop/examples_and_tests_together.feature
features/interop/rspec_output.feature
features/interop/test_but_not_test_unit.feature
@@ -91,6 +92,7 @@ features/pending/pending_examples.feature
features/runner/specify_line_number.feature
features/spec_helper/spec_helper.feature
features/step_definitions/running_rspec_steps.rb
+features/step_definitions/stubbing_steps.rb
features/subject/explicit_subject.feature
features/subject/implicit_subject.feature
features/support/env.rb
@@ -153,7 +155,6 @@ lib/spec/matchers/exist.rb
lib/spec/matchers/generated_descriptions.rb
lib/spec/matchers/has.rb
lib/spec/matchers/have.rb
-lib/spec/matchers/have_received.rb
lib/spec/matchers/include.rb
lib/spec/matchers/match.rb
lib/spec/matchers/match_array.rb
@@ -276,7 +277,6 @@ spec/spec/matchers/eql_spec.rb
spec/spec/matchers/equal_spec.rb
spec/spec/matchers/exist_spec.rb
spec/spec/matchers/has_spec.rb
-spec/spec/matchers/have_received_spec.rb
spec/spec/matchers/have_spec.rb
spec/spec/matchers/include_spec.rb
spec/spec/matchers/match_array_spec.rb
View
@@ -50,6 +50,5 @@ examples.
[sudo] gem install rspec
- or
-
- clone, build, install - See http://wiki.github.com/dchelimsky/rspec
+See http://wiki.github.com/dchelimsky/rspec if you want
+to clone/build/install.
View
@@ -1,29 +1,60 @@
-= Upgrade to next version (in git)
-
-== What's new
-
-=== raise_exception
-
-We changed the raise_error matcher to raise_exception, and aliased it with
-raise_error. This maintains backward compatibility, and also gives you the
-option of being more precise in specs about what is expected.
+= Upgrade to 1.3.0
== What's changed
-=== be_true and be_false
+=== +be_true+ and +be_false+
These methods now align with Ruby's conditional semantics:
-* be_false passes for false and nil
-* be_true passes for everything else
+* +be_false+ passes for +false+ and +nil+
+* +be_true+ passes for everything else
This is a change from the previous behaviour (which wasn't working correctly
-anyway!), which was supposed to treat be_true as equal(true), and be_false as
-equal(false).
+anyway), which was supposed to treat +be_true+ as <tt>equal(true)</tt>, and +be_false+ as
+<tt>equal(false)</tt>.
If the actual values +true+ and +false+ are meaningful to your examples, you'll
-want to change the to use equal(true) and equal(false) (or ==(true) and
-==(false)).
+want to change the to use <tt>equal(true)</tt> and <tt>equal(false)</tt> (or
+<tt>==(true)</tt> and <tt>==(false)</tt>).
+
+=== +raise_exception+
+
+We changed the +raise_error+ matcher to +raise_exception+, and aliased it with
++raise_error+. This maintains backward compatibility, and also gives you the
+option of being more precise in specs about what is expected.
+
+=== Matcher DSL
+
+==== +match+ rescues from +ExpectationNotMetErrror+ by default
+
+This allows you to wrap other expectations in the +match+ method. Consider
+this matcher:
+
+ Spec::Matchers.define :teach do |subject|
+ match do |teacher|
+ teacher.subjects.should include(subject)
+ end
+ end
+
+The block passed to +match+ is called internally by Rspec, and is expected to
+return a boolean value. In this case, if <tt>should include(subject)</tt>
+fails, it raises an +ExpectationNotMetError+.
+
+Beginning with rspec-1.3.0, when the match block raises an
++ExpectationNotMetError+, it is captured and the block returns +false+.
+Otherwise it returns +true+, so it works like any other matcher.
+
+==== match_unless_raises
+
+The new +match_unless_raises+ method allows you to wrap <tt>Test::Unit</tt>
+assertions by capturing +AssertionFailedError+ and returning false, just as the
++match+ method now does with +ExpectationNotMetError+.
+
+ Spec::Matchers.define :teach do |subject|
+ match_unless_raises Test::Unit::AssertionFailedError do |teacher|
+ assert teacher.subjects.include?(subject)
+ end
+ end
= Upgrade to rspec-1.2.9
View
@@ -2,8 +2,8 @@ module Spec # :nodoc:
module VERSION # :nodoc:
unless defined? MAJOR
MAJOR = 1
- MINOR = 2
- TINY = 9
+ MINOR = 3
+ TINY = 0
PRE = nil
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')

0 comments on commit 87ab554

Please sign in to comment.