Oh and I am grateful for your refactoring and explanations, simplies my code
and tests (and understanding!)
On Wed, Jun 29, 2011 at 3:19 PM, S Ahmed wrote:
> Ok I got it working, and honestly I have no idea why it is working.
>
> There was a test below it which I modified (I had updated_at inste
Ok I got it working, and honestly I have no idea why it is working.
There was a test below it which I modified (I had updated_at instead of
created_at).
I ALMOST feel as if the file was cached and not looking at the right file,
but not sure if that is even possible.
On Wed, Jun 29, 2011 at 3:07
Your code worked, let me try and figure out why mine isn't working
Your right it isn't exactly what I have, but pretty much everything is
identical except for the naming of the model.
On Wed, Jun 29, 2011 at 2:20 PM, David Chelimsky wrote:
> On Jun 29, 2011, at 12:21 PM, S Ahmed wrote:
>
> >
On Jun 29, 2011, at 12:21 PM, S Ahmed wrote:
> My method looks like:
>
> def self.can_do_this(user)
> return false if user.nil?
> ( (Time.now >= user.created_at) ? true : false )
> end
>
> my spec:
>
> it "should allow you to do this" do
> user = stub("user")
> user.stub(:nil?).and_re
My method looks like:
def self.can_do_this(user)
return false if user.nil?
( (Time.now >= user.created_at) ? true : false )
end
my spec:
it "should allow you to do this" do
user = stub("user")
user.stub(:nil?).and_return(false)
user.stub(:created_at).and_return(Time.now)
res = Use