The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Planet Argon and Rspec musings

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Andy Delcambre

Posts: 66
Nickname: adelcambre
Registered: Sep, 2007

Andy Delcambre is a developer at PLANET ARGON
Planet Argon and Rspec musings Posted: Sep 4, 2007 5:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Andy Delcambre.
Original Post: Planet Argon and Rspec musings
Feed Title: Andy Delcambre
Feed URL: http://feeds.feedburner.com/andydelcambre
Feed Description: Andy has been using Ruby and Ruby on Rails since 2006 and has been working with Ruby on Rails professionally since June 2007.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Andy Delcambre
Latest Posts From Andy Delcambre

Advertisement

Started work at Planet Argon today. I have been chatting with them for about 6 weeks, and I am extremely excited to start working with them. Today was pretty slow to start (as I expected), getting accounts going, getting mysql working properly on my laptop, getting subversion checkouts, etc, etc. Then I got started working on some actual coding.

I am starting out writing some specs for the project I am working on. I have used rspec for a few different projects but I hadn’t had a chance to play with the new syntax yet. It is basically exactly the same as when I used it just with different method names, but it really makes a huge difference in the style it forces you into.

With the old method, how to describe the specs was always a bit weird to me. For example:


context "a new group with no users" do
   specify "group should not be valid" do
        #...
   end
end

With the new style everything seems to flow naturally. For example:


describe Group, " with no users" do
   it "should not be valid" do
        @group.should_not be_valid
   end
end

Interesting is that I often feel like I write the same thing twice, once in english, then again in the DSL of rspec. But if you read them out loud, they are basically the same:


it "should have four elements" 
@thing.should have(4).elements

I also often find that I can guess the right syntax which is HUGE for rapid development times. I really like rspec, and I think I am really going to like working for Planet Argon.

P.S. Backspace has awesome sandwiches.

Read: Planet Argon and Rspec musings

Topic: Tweets on 2007-09-03 Previous Topic   Next Topic Topic: Water restrictions

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use