Checking for Cookie Deletion by a Rails Controller with Rspec

April 15th, 2014 by rjk No comments »

Today I needed to prove that my Rails controller method deleted a cookie.  After Googling for the answer (without success), I came up with the following.

Within your controller:

cookies.delete('cookie-to-delete')

In your controller spec you can check that the cookie was deleted with:

expect(response.cookies).to include('cookie-to-delete' => nil)

Rails sets the cookies to be deleted to a value of nil.  By checking for the presence of both the cookie name with a value of nil, you can ensure your controller code deleted the cookie.

Welcome to the World Natalie!

April 7th, 2010 by rjk No comments »

After 3 days and 15 final hours of labour, Natalie Elizabeth Kaes entered the world via C-section at 9:43am.  We’re so excited to finally meet you!

Natalie at the hospital the day she was born

Listing all the Hardware on a Server

March 10th, 2010 by rjk No comments »

Short post to serve as a reminder to myself!

Something I need to do often in my job is find out what hardware a particular server has installed.

The best tool I found for the job is HardwareLiSter. On a CentOS system simply do:

sudo yum install lswh

to install and then run:

sudo lshw | less

to see what you’re dealing with.

It’s a Little Girl!

November 14th, 2009 by rjk No comments »

Today’s ultrasound went great! This was our first chance to see our baby as a baby (and not as a blob of blurry pixels.) The technician was great, and spent nearly 20 minutes with us taking all sorts of pictures. The very first photo told us that we’re having a girl.

I enjoyed this ultrasound as Natalie (the name we decided on for the baby) was very active and moving around. It was so fascinating watching her wave, and kick, and blink, and suck her thumb.

Only five more months to go. Can’t wait!

Ottawa Was a Blast

September 23rd, 2009 by rjk No comments »

Our trip to Ottawa was a blast.  Rosey has posted a bunch of our photos online. It was nice to get away for a while. The drive up took 7 hours, but that’s because we stopped a lot (all the rest stops along the 401.) Once we got past Toronto, the drive actually wasn’t too bad. The scenery was absolutely beautiful, and it was great seeing the names of places I had only ever seen on a map.

Our hotel was right beside Byword Market, so we were able to walk everywhere we wanted to go. I really appreciated that as I did not want to drive.

Our first day of walking was to the National Art Galley. We walked past the American Embassy, which was very odd.  It looks like a prison with all the barred windows and gates. The funniest part was seeing the protesters on the other side of the road.

The art gallery was great.  Very big.  It took us a nearly three hours to go through the entire building. The rest of the week was spent exploring Byword Market and the shops around it.

On our last day we walked up to Parliament Hill and took a bunch of pictures. We have some great shots of the various statues, and the cat sanctuary.

Our drive back was less eventful.  Only took six hours. We made it back in time to get the cat from the vet before they closed, so our whole family is now back home.

Definitely was well worth the money, and it was a great way to escape what had been a rather trying series of months.

48 Hour Emotional Rollercoaster

September 16th, 2009 by rjk No comments »

The past 48 hours have been the most trying of my life.

It started Saturday night when Rosey yelled for me to help her in the bathroom. She was bleeding. A lot. Unfortunately, there was nothing I could do other than be there for support. We spent an hour in the bathroom and were positive that Rosey had miscarried. Finally, once all the bleeding had stopped, I packed her into the car and drove down to the local hospital.

We waited three hours for a doctor to examine Rosey and in that time we ran through the gamut of emotions. At 3am Rosey was examined, and the doctors were fairly confident that she had, in fact, had a miscarriage. They scheduled an ultrasound for Monday to confirm that everything had passed and that she was not at any risk of an infection.

Obviously, we were both completely devastated. Rosey’s pregnancy so far had been extremely difficult with her sleeping 18+ hours a day and unable to eat.  (She had lost nearly 10 lbs.) But we didn’t want it to end like that.

We talked a lot about our situation on Sunday, and Rosey was feeling physically better, which was at least a small positive.

On Monday afternoon, we went in for the ultrasound and received the surprise of a lifetime…

Our baby was still there! Heart still beating. It had not even moved!

Rosey was hysterical.

I was stunned.

What had just happened? How could Rosey lose that much blood and clots and everything be okay? All we had was questions, and no answers. The medical centre quickly scheduled us in for an appointment the next day. There they performed another set of tests on Rosey and everything looked good. No signs of any trauma.

The doctor were not able to explain what exactly had happened, and could not rule out a potential miscarriage in the future, but at the moment the baby is doing well, and Rosey is feeling a lot better. They’ve prescribed new medication to help alleviate her morning sickness and allow her to eat.

It’s a nerve wracking time for us now. We overjoyed that we hadn’t lost the baby, but so scared about what might happen. All we can do is try and stay positive. Whatever happens will happen and there’s not much we can do to prevent it.

Hopefully our trip to Ottawa this weekend will take our mind off the potential bad. I just want the rest of the pregnancy to go smoothly. No more scares. One normal, health baby at the end.

Going to Be a Daddy

September 10th, 2009 by rjk No comments »

So, yeah, going to be a daddy!  We’re very excited.  This is the week eight ultrasound.  Only 32 more weeks to go!

(I know there really isn’t much to see.  Sort of looks like a blurry set of pixels.  Later ones ought to be more focused.)

Rosey and I As SouthPark Characters

February 26th, 2007 by rjk No comments »

Rosey found this great link for creating yourself as South Park characters. She then proceeded to create a composite of both her and I.

Rosey and I as South Park characters

Rosey and I as South Park characters