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" So is error_on itself deprecated, or is it just the old should_have? The docs aren''t very clear to me in that respect. Pat
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 >
On 3/1/07, David Chelimsky <dchelimsky at gmail.com> wrote:> 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 ;)I realize there''s a huge difference. In fact...let it be known that I''ve read basically every OOP design book known to man. I''ve studied them in depth. Despite that, 80% of my understanding of OOP comes from relatively small discussions from David Chelimsky.> > 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".That''s all I was asking. Pat