On Nov 29, 2007, at 5:54 AM, Daniel Tenner wrote:

> What are people's opinions on which of these two styles is better to
> use?
>
>
>   it "should be possible to disable the number" do
>     given(valid_sms_user) do |user|
>       user.save
>       user.disable_number
>       user.should be_disabled
>     end
>   end
>


it "should be possible to disable the number" do
   lambda {
     user.save
     user.disable_number
   }.should change(user, :disabled?).from(true).to(false)
end

If this doesn't work, the solution is very close to this.

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to