RSpec Changelog
Version 0.7.5.1
Bug fix release to allow downloads of rspec gem using rubygems 0.9.1.
Version 0.7.5
This release adds support for Heckle - Seattle‘rb‘s code
mutation tool. There are also several bug fixes to the RSpec core and the
RSpec on Rails plugin.
- Removed svn:externals on rails versions and plugins
- Applied [7345] Adding context_setup and context_teardown, with specs and
100% rcov
- Applied [7320] [PATCH] Allow XHR requests in controller specs to render RJS
templates
- Applied [7319] Migration code uses drop_column when it should use
remove_column (patch from Pat Maddox)
- Added support for Heckle
- Applied [7282] dump results even if spec is interrupted (patch from Kouhei
Sutou)
- Applied [7277] model.should_have(n).errors_on(:attribute) (patch from
Wilson Bilkovich)
- Applied [7270] RSpec render_partial colliding with simply_helpful (patch
from David Goodlad)
- Added [7250] stubs should support throwing
- Added [7249] stubs should support yielding
- Fixed [6760] fatal error when accessing nested finders in rspec
- Fixed [7179] script/generate rspec_resource generates incorrect helper name
- Added preliminary support for assert_select (response.should_have)
- Fixed [6971] and_yield does not work when the arity is -1
- Fixed [6898] Can we separate rspec from the plugins?
- Added [7025] should_change should accept a block
- Applied [6989] partials with locals (patch from Micah Martin)
- Applied [7023] Typo in team.page
Version 0.7.4
This release features a complete redesign of the reports generated with
—format html. As usual there are many bug fixes - mostly related to
spec/rails.
- Applied [7010] Fixes :spacer_template does not work w/ view spec (patch
from Shintaro Kakutani)
- Applied [6798] ensure two ’:’ in the first backtrace line for
Emacs‘s ‘next-error’ command (patch from Kouhei Sutou)
- Added Much nicer reports to generated website
- Much nicer reports with —format —html (patch from Luke Redpath)
- Applied [6959] Calls to render and redirect in controllers should return
true
- Fixed [6981] helper method is not available in partial template.
- Added [6978] mock should tell you the expected and actual args when
receiving the right message with the wrong args
- Added the possibility to tweak the output of the HtmlFormatter (by
overriding extra_failure_content).
- Fixed [6936] View specs don‘t include ApplicationHelper by default
- Fixed [6903] Rendering a partial in a view makes the view spec blow up
- Added callback library from Brian Takita
- Added [6925] support controller.should_render :action_name
- Fixed [6884] intermittent errors related to method binding
- Fixed [6870] rspec on edge rails spec:controller fixture loading fails
- Using obj.inspect for all messages
- Improved performance by getting rid of instance_exec (instance_eval is good
enough because we never need to pass it args)
Version 0.7.3
Almost normal bug fix/new feature release.
A couple of things you need to change in your rails specs: # spec_helper.rb
is a little different (see rspec.rubyforge.org/upgrade.html)
# use controller.should_render before OR after the action
(controller.should_have_rendered is deprecated)
- Applied [6577] messy mock backtrace when frozen to edge rails (patch from
Jay Levitt)
- Fixed [6674] rspec_on_rails fails on @session deprecation warning
- Fixed [6780] routing() was failing...fix included - works for 1.1.6 and
edge (1.2)
- Fixed [6835] bad message with arbitrary predicate
- Added [6731] Partial templates rendered
- Fixed [6713] helper methods not rendered in view tests?
- Fixed [6707] cannot run controller / helper tests via rails_spec or spec
only works with rake
- Applied [6417] lambda {…}.should_change(receiver, :message) (patch
from Wilson Bilkovich)
- Eliminated dependency on ZenTest
- Fixed [6650] Reserved characters in the TextMate bundle break svn on Win32
- Fixed [6643] script/generate rspec_controller: invalid symbol generation
for ‘controller_name’ for modularized controllers
- The script/rails_spec command has been moved to bin/drbspec in RSpec core
(installed by the gem)
Version 0.7.2
This release introduces a brand new RSpec bundle for TextMate, plus some
small bugfixes.
- Packaged RSpec.tmbundle.tgz as part of the distro
- Fixed [6593] Add moving progress bar to HtmlFormatter using Javascript
- Applied [6265] should_raise should accept an Exception object
- Fixed [6616] Can‘t run Rails specs with RSpec.tmbundle
- Fixed [6411] Can‘t run Rails specs with ruby
- Added [6589] New -l —line option. This is useful for IDE/editor
runners/extensions.
- Fixed [6615] controller.should_render_rjs should support :partial =>
‘path/to/template‘
Version 0.7.1
Bug fixes and a couple o’ new features.
- Fixed [6575] Parse error in aliasing the partial mock original method
(patch by Brian Takita)
- Fixed [6277] debris left by stubbing (trunk) [submitted by dastels] (fixed
by fix to [6575])
- Fixed [6575] Parse error in aliasing the partial mock original method
- Fixed [6555] should_have_tag does not match documentation
- Fixed [6567] SyntaxError should not stop entire run
- Fixed [6558] integrated views look for template even when redirected
- Fixed [6547] response.should_be_redirect broken in 0.7.0
- Applied [6471] Easy way to spec routes
- Applied [6587] Rspec on Rails displays
"Spec::Rails::ContextFactory" as context name
- Applied [6514] Document has trivial typos.
- Added [6560] controller.session should be available before the action
- Added support for should_have_rjs :visual_effect
- Different printing and colours for unmet expectations (red) and other
exceptions (magenta)
- Simplified method_missing on mock_methods to make it less invasive on
partial mocks.
Version 0.7.0
This is the "Grow up and eat your own dog food release". RSpec is
now used on itself and we‘re no longer using Test::Unit to test it.
Although, we are still extending Test::Unit for the rails plugin
(indirectly - through ZenTest)
IMPORTANT NOTE: THIS RELEASE IS NOT 100% BACKWARDS COMPATIBLE TO 0.6.x
There are a few changes that will require that you change your existing
specs.
RSpec now handles equality exactly like ruby does:
# actual.should_equal(expected) will pass if actual.equal?(expected)
returns true # actual.should_eql(expected) will pass if
actual.eql?(expected) returns true # actual.should == expected will pass if
actual == expected) returns true
At the high level, eql? implies equivalence, while equal? implies object
identity. For more information on how ruby deals w/ equality, you should do
this:
ri equal?
or look at this:
www.ruby-doc.org/core/classes/Object.html#M001057
Also, we left in should_be as a synonym for should_equal, so the only specs
that should break are the ones using should_equal (which used to use
== instead of .equal?).
Lastly, should_be used to handle true and false differently from any other
values. We‘ve removed this special handling, so now actual.should_be
true will fail for any value other than true (it used to pass for any
non-nil, non-false value), and actual.should_be false will fail for any
value other than false (it used to pass for nil or false).
Here‘s what you‘ll need to do to update your specs: # search
for "should_equal" and replace with "should_eql" # run
specs
If any specs still fail, they are probably related to should_be(true) or
should_be(false) using non-boolean values. Those you‘ll just have to
inspect manually and adjust appropriately (sorry!).