jimweirich / rspec-given

Given/When/Then keywords for RSpec Specifications
https://github.com/jimweirich/rspec-given
MIT License
653 stars 61 forks source link

rspec issuing warning when specs lack a #description #27

Closed searls closed 11 years ago

searls commented 11 years ago

Hey @jimweirich, I'm on the latest RSpec (and Given) and when I run a Then, I get this warning at the end of my spec execution:

When you call a matcher in an example without a String, like this:

specify { object.should matcher }

or this:

it { should matcher }

RSpec expects the matcher to have a #description method. You should either
add a String to the example this matcher is being used in, or give it a
description method. Then you won't have to suffer this lengthy warning again.

My Gemfile.lock follows:

PATH
  remote: .
  specs:
    arg-that (0.0.1)

GEM
  remote: https://rubygems.org/
  specs:
    diff-lcs (1.2.4)
    given_core (3.0.0)
      sorcerer (>= 0.3.7)
    rake (10.1.0)
    rspec (2.14.1)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    rspec-core (2.14.3)
    rspec-expectations (2.14.0)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-given (3.0.0)
      given_core (= 3.0.0)
      rspec (>= 2.12)
    rspec-mocks (2.14.1)
    sorcerer (1.0.0)

PLATFORMS
  ruby

DEPENDENCIES
  arg-that!
  bundler (~> 1.3)
  rake
  rspec
  rspec-given

Sorry if this is a dupe or if you're aware of it.

jimweirich commented 11 years ago

Nope, not seen this before. And not able to duplicate it either. Can you show me the Then clause causing the grief?

searls commented 11 years ago

Ugh, I can't replicate now. I could for a while. It was while I was getting started on arg-that. Just spent more time trying to replicate this than I did writing the gem. Sigh.Thanks for checking on this, though!