Rspec 2.7.0.rc1 is released!

rspec 2.7.0.rc1 is released!

This includes the following (see the changelog for each lib below):

rspec-2.7.0.rc1
rspec-core-2.7.0.rc1
rspec-expectations-2.7.0.rc1
rspec-mocks-2.7.0.rc1
rspec-rails-2.7.0.rc1

Please direct any questions or issues to the github issues tracker for
each repository or http://rubyforge.org/mailman/listinfo/rspec-users.

Enjoy!

David

rspec-core-2.7.0.rc1

full changelog:

NOTE: RSpec’s release policy dictates that there should not be any
backward
incompatible changes in minor releases, but we’re making an exception to
release a change to how RSpec interacts with other command line tools.

As of 2.7.0, you must explicity require "rspec/autorun" unless you use
the
rspec command (which already does this for you).

  • Enhancements
    • Add example.exception (David C.)
    • –default_path command line option (Justin Ko)
    • support multiple --line_number options (David J. Hamilton)
      • also supports path/to/file.rb:5:9 (runs examples on lines 5 and
  • Allow classes/modules to be used as shared example group identifiers
    (Arthur G.)

  • Friendly error message when shared context cannot be found (Sławosz
    Sławiński)

  • Clear formatters when resetting config (John Bintz)

  • Add xspecify and xexample as temp-pending methods (David C.)

  • Add --no-drb option (Iain H.)

  • Provide more accurate run time by registering start time before code
    is loaded (David C.)

  • Rake task default pattern finds specs in symlinked dirs (Kelly
    Felkins)

  • Rake task decides whether to use bundler or not based on presence
    of BUNDLE_GEMFILE (David C.)

  • Bug fixes

    • Include Rake::DSL to remove deprecation warnings in Rake > 0.8.7
      (Pivotal
      Casebook)
    • Only eval let block once even if it returns nil (Adam Meehan)
    • Fix --pattern option (wasn’t being recognized) (David C.)
    • Only implicitly require “rspec/autorun” with the rspec command
      (David
      Chelimsky)
    • Ensure that rspec’s at_exit defines the exit code (Daniel
      Doubrovkine)
    • Show the correct snippet in the HTML and TextMate formatters (Brian
      Faherty)

rspec-expectations-2.7.0.rc1

full changelog:

  • Enhancements

    • HaveMatcher converts argument using #to_i (Alex Bepple & Pat M.)
    • Improved failure message for the have_xxx matcher (Myron M.)
    • HaveMatcher supports #count (Matthew Bellantoni)
    • Change matcher dups Enumerable before the action, supporting custom
      Enumerable types like CollectionProxy in Rails (David C.)
  • Bug fixes

    • Fix typo in have(n).xyz documentation (Jean Boussier)
    • fix safe_sort for ruby 1.9.2 (Kernel now defines <=> for Object)
      (Peter van Hardenberg)

rspec-mocks-2.7.0.rc1

full changelog:

  • Enhancements

    • Use __send__ rather than send (alextk)
    • Add support for any_instance.stub_chain (Sidu P.)
    • Add support for any_instance argument matching based on with (Sidu
      Ponnappa and Andy Lindeman)
  • Changes

    • Check for #failure_message_for_should or #failure_message instead of
      #description to detect a matcher (Tibor Claassen)
  • Bug fixes

    • pass a hash to any_instance.stub. (Justin Ko)
    • allow :to_ary to be called without raising NoMethodError (Mikhail
      Dieterle)

rspec-rails-2.7.0.rc1

full changelog:

  • Enhancments

    • ActiveRecord::Relation can use the “=~” matcher (Andy Lindeman)
    • Make generated controller spec more consistent with regard to ids
      (Brent J. Nordquist)
    • Less restrictive autotest mapping between spec and implementation
      files
      (José Valim)
    • require ‘rspec/autorun’ from generated spec_helper.rb (David
      Chelimsky)
    • bypass_rescue (Lenny M.)
    • route_to accepts query string (Marc Weil)
  • Internal

    • Added specs for generators using ammeter (Alex Rothenberg)
  • Bug fixes

    • Fix configuration/integration bug with rails 3.0 (fixed in 3.1) in
      which
      fixure_file_upload reads from ActiveSupport::TestCase.fixture_path
      and misses
      RSpec’s configuration (David C.)
    • Support nested resource in view spec generator (David C.)
    • Define primary_key on class generated by mock_model(“WithAString”)
      (David
      Chelimsky)

On 9 Oct 2011, at 21:23, David C. wrote:

  • Allow classes/modules to be used as shared example group identifiers
    (Arthur G.)

This sounds awesome. Are there any full examples? I could only see unit
tests in the code.

Ash


http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashmoran

On 10 Oct 2011, at 15:22, David C. wrote:

Nope. Wanna add one?

The basic idea is:

shared_examples Enumerable do

Aye, that’s what I figured :slight_smile: I’ve wished for that for a long time.

I’m away for a bit but I’ll see if I get chance soon.

Ash


http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashmoran

On Oct 10, 2011, at 4:16 AM, Ash M. wrote:

On 9 Oct 2011, at 21:23, David C. wrote:

  • Allow classes/modules to be used as shared example group identifiers
    (Arthur G.)

This sounds awesome. Are there any full examples? I could only see unit tests in
the code.

Nope. Wanna add one?

The basic idea is:

shared_examples Enumerable do
describe “#count” do
it “returns 0 by default” do
subject.count.should eq(0)
end
end
end

describe SpecialCollection do
it_behaves_like Enumerable
end

Cheers,
David

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs