Re: [rspec-users] First Model Macro

2011-12-26 Thread Phillip Koebbe
On Dec 26, 2011, at 12:09 PM, Ants Pants wrote: > > > On 26 December 2011 18:01, Phillip Koebbe wrote: > > On Dec 26, 2011, at 10:06 AM, Ants Pants wrote: > > > Hello all, > > > > I trust you are having a good one. > > > > I'm just trying out macros and my first one is taken from the RSpec b

Re: [rspec-users] First Model Macro

2011-12-26 Thread Ants Pants
On 26 December 2011 18:01, Phillip Koebbe wrote: > > On Dec 26, 2011, at 10:06 AM, Ants Pants wrote: > > > Hello all, > > > > I trust you are having a good one. > > > > I'm just trying out macros and my first one is taken from the RSpec book > which replaces . > > > > @obj.should_not be_valid

Re: [rspec-users] First Model Macro

2011-12-26 Thread Phillip Koebbe
On Dec 26, 2011, at 10:06 AM, Ants Pants wrote: > Hello all, > > I trust you are having a good one. > > I'm just trying out macros and my first one is taken from the RSpec book > which replaces . > > @obj.should_not be_valid > @obj.should have(1).error_on(:attr) > > with the macro >

[rspec-users] First Model Macro

2011-12-26 Thread Ants Pants
Hello all, I trust you are having a good one. I'm just trying out macros and my first one is taken from the RSpec book which replaces . @obj.should_not be_valid @obj.should have(1).error_on(:attr) with the macro should_require_attribute Model, :attribute My first attempt is basic but