> class Cat
>   class << self
>      def start
>            id = get_uuid
>            begin
>               yield if block_given?
>            ensure
>                set_some_other_state
>            end
>      end
>    end
>    #...
> end

In spite of the fact that you have an #id= method, `id = get_uuid` is
setting a local variable, not invoking the #id= method.  Use `self.id
= get_uuid` to invoke the method and set the attribute.

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

Reply via email to