[rspec-users] error_on is deprecated?

David Chelimsky dchelimsky at gmail.com
Thu Mar 1 16:20:22 EST 2007


On 3/1/07, Pat Maddox <pergesu at gmail.com> wrote:
> The docs say
>
> DEPRECATED. See Spec::Rails::Expectations
>
> model.should_have(:no).errors_on(:attribute)
> model.should_have(1).error_on(:attribute)
> model.should_have(3).errors_on(:attribute)
>
> However the rdoc for Spec::Rails::Expectations shows the same code.
> The only difference is that it's "model.should
> have(1).error_on(:attribute) instead"

That's a big difference ;)

> So is error_on itself deprecated, or is it just the old should_have?

It's specifically "should_have". It'll work fine if you use "should have".

> The docs aren't very clear to me in that respect.
>
> Pat
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list