You are currently browsing the tag archive for the 'rspec' tag.

I’d forgotten how fun trying to pull all the pieces together on a last-minute high-pressure project could be.

  • Rubinius for the Layman, Part 3 - Try Rubinius in 20 minutes - Rubinius took a blow this week when Engine Yard let some folks go, but things are mature enough that you can see the current state of the project easily if you want.
  • If you use Mocha and RSpec then read this - Jake Scruggs points out a useful plugin if you’re in this boat.
  • Calendar Date Select - Rails plugin for popup calendars. I used this in an app this week and so far it’s working out nicely.
  • SWFUpload, Paperclip and Ruby on Rails - I find myself needing to implement SWFUpload again. This is a good wrapup post on the issues in Rails, though I think I’m going to need to tweak it a bit to work with Authlogic.
  • File Type Detection (RSpec & Rails) - Notes on sorting filetype detection out in TextMate.
  • Uploading to multiple S3 buckets with Paperclip and Rails - A very useful technique to increase the speed of showing multiple images on a single page.
  • Paperclip Extended - Some useful extra functions for Paperclip.
  • Rails Meets Sinatra - Serving two frameworks through one application.
  • I’ve shut down and reformatted my Windows desktop for good (I hadn’t turned it on for six months or so, it just took me this long to get around to reformatting the drives). If anyone wants a deal on a Dell PowerEdge 1800 server before I EBay it, holler.

  • We’ve stopped using rSpec … - And ignited a bunch of debate in comments. Caboose has bailed out; the comment chain is interesting for a glimpse of what testing solutions the community is using.
  • Google Analytics plugin - Finally got around to making some doc and feature improvements to my fork of this project.
  • giternal - An alternative for managing git externals in your Rails project. Or any other project, for that matter.
  • Yesterday saw my first posting to the official Rails weblog. A nice step on the way to world domination, I guess.

  • Gerrit and Repo, the Android Source Management Tools - Google has built some tools to make git work better for large-scale projects, including workflow and code-review bits.
  • RubyMine Public Preview - JetBrains is getting into the Rails IDE business. I may take a look, though honestly, two years after closing the IDE I don’t miss it.
  • GitHub Code Search - A bit of poking around here reveals that Ruby coders pretty much have a lock on the chunky bacon market.
  • Life on the Edge with Merb, DataMapper, and RSpec - Work-in-progress aimed for folks who might be thinking of switching from Rails.
  • ActiveSupport::Rescuable - Pratik Naik shows how to mix this into your own code with Rails 2.2.
  • 40 Beautiful Free Icon Sets - Some nice stuff out there; be sure to check the fine print before using.
  • I tossed out a few more bits of open source code over the weekend: a fork of suprails (though actually I hope the original project just merges my one tiny change), and a proposed change for Rails core (which you’re welcome to go test and, hopefully, +1).

  • When autotest fails - Apparently RSpec has a built-in server to speed up running tests. Unfortunately, I’ve not been able to get it working in my own projects.
  • The Sorry State of Blogging Software - Adam bemoans the Rails blogging infrastructure, among other choices.
  • Drag and Drop Sorting with JQuery and Rails - Ben Curtis shows how to do it.
  • Turn-Key: SaaS Rails Find Home in Morph AppSpace - Morph now offers one-click deployment for Beast, El Dorado, Substruct, and Tracks.
  • rboard - Rails-based forums that I need to look at the next time I have need of such a thing.
  • I was complaining a few days ago that I was having trouble with authentication in cucumber stories in conjunction with RSpec. It turned out I was making a very stupid mistake (”administrator” and “admin” are not, in fact, the same thing). But in the interests of helping out anyone who ends up here via search engine, here’s how I’ve got it sorted out for now.

    Here’s one of our current cucumber scenarios:

    
      Scenario: See all vendors
    	Given I am logged in as a user in the administrator role
    	And There are 3 vendors
    	When I go to the manage vendors page
    	Then I should see the first 3 vendor names
    

    And here’s the corresponding part of the step file that handles the login:

    
    Given /i am logged in as a user in the (.*) role/i do |role|
      @user = Factory.create(:user, :name => "the user",
        :login => "the_login",
        :password => "password",
        :password_confirmation => "password")
      @role = Factory.create(:role, :rolename => role)
      @user.roles << @role
      visits "/login"
      fills_in("login", :with => "the_login")
      fills_in("password", :with => "password")
      clicks_button("Log in")
    end
    

    Note that I’m using Factory Girl to instantiate objects in this application’s tests.

    There may be a better pattern for this - I’m just getting started with cucumber. But for now, it works for me.

    My latest work in progress: The Rails Initialization Process.

    Anyone had to manage cucumber/webrat stories that include logging on to a session via restful authentication? How’d you do it?

    Early mornings are the most peaceful time around here. Which may explain why I’m awake at 4AM.

    • CouchDB with Rails - The latest screencast from PeepCode. CouchDB has been on my radar for a long time but I haven’t had a good excuse to use it yet.
    • Reminder Tests - Dan Manges suggest some novel uses for automated tests. Well, novel to me, anyhow.
    • Cucumber - Plain-text BDD tool that’s an alternative to RSpec stories.
    • turled - The “look up Twitter users’ web sites fast” script has turned into a whole site, complete with my Ubiquity command.

    I’ve now reached the point where setting up a new Rails server at RimuHosting is almost routine. I may know a thing or two about sysadmin after all.

    • JustHackIt - Folks looking for other folks to hack code with, for fun or profit. Proof that having an idea is not the hardest part.
    • RSpec: It Should Behave Like - RSpec pattern advice from Robby Russell.

    Without Mondays to absorb all the extra email, Tuesdays would be a disaster.

    Sick kids have been taking more time than net cruising lately.

    • New Controller Examples - David Chelminsky is experimenting with the scaffolded tests that RSpec generates for RESTful controllers.
    • REST Anti-Patterns - Ways in which to drift away from RESTfulness when building a web service.

    Switching an app from solr to ferret today…and crossing my fingers.

    I am convinced I am going to will the remaining unfixed bugs on one project to my heirs. Time to buckle down for another pass at them, I guess.

    Moving back to more Rails work for the rest of the week, it looks like.

    Nailed down another contract yesterday - this one for some design and building work in Second Life. Nice to have the billing base broadened a bit.

    • About the Mac OS X 10.5.2 Update - This installed smoothly for me, though I’m not seeing any amazing changes (except for the temporary loss of my beloved GrowlMail again).
    • Andrzej’s Rails tips #5 - A couple of nice RSpec-related tips.
    • RubyFringe - Rails is too staid for some folks now; here’s a new conference for people who want to work with Ruby stuff (mainly web-related) “outside of the Rails monoculture.”
    • Nginx & Memcached, a 400% Boost! - More fiddling with the Rails production stack.

    I wasn’t able to post this yesterday because our T1 line went down for 16 hours. It was almost like living in the boondocks again!

    I’m hoping some renewed energy and inspiration comes out of somewhere today, because I sure didn’t have any this weekend.

    Whew, long weeks are good for billables but they make me ready for weekends. Oh, wait, I’m planning some work this weekend too.

    • RSpec User Stories - The latest PeepCode screencast. I think I need to watch this one too.
    • Run BASIC - On the other hand, I could just get back to my roots with this implementation of simple Liberty Basic as a web language.

    As I expected, I’m really enjoying getting back several hours a day that I used to spend keeping up on .NET news.

    I spent much of yesterday doing an archive & install on OS X 10.5 on my main dev box, then reinstalling all the gems I use. Took a while to get everything set up, but it was worth it to not have two installs of ruby and two battling sets of gems. I think.

    • Rails 2.0.2: Some new defaults and a few fixes - Here’s the official announcement of yesterday’s minor Rails release.
    • Rails 2.0.2 released, so what’s new? - Another take on the new features.
    • Sqliteman - With Sqlite3 being suddenly the default Rails database (as of Rails 2.0.2), I spent some time looking around for Sqllite GUIs that work under OS X. (Yeah, I’m a wimp that way). This one has the advantage of being free, though it’s not real well-organized and has that Qt look to it.
    • RazorSQL - Commercial database query tool that claims Sqlite compatibility via JDBC. Haven’t tried it.
    • SQLite Manager 0.2.11 - Sqlite database tool implemented as a Firefox add-on. Actually not bad.
    • What’s Coming in Instant Rails 2.0 and Beyond - The Road Map - Plans from the new project maintainer.
    • Installing ruby mysql gem in OSX 10.5 - I decided I could do without building everything from source this time around. MySQL was the trickiest to get cooking from a download & gem install.
    • Ruport 1.4 Preview Release - If you’re using Ruport for reporting you probably want to have a look at this.
    • RSpec Textmate Bundle errors - I had a good deal of trouble getting RSpec to work correctly within TextMate. This thread describes the symptom, but the fixes there did not work for me. Ultimately I had to checkout the RSpec trunk svn, build that, and symlink the resulting TextMate bundle in to make sure everything was synched.
    • Setting up autotest to use Growl - A nice little extra if you’re doing continuous testing.
    • Bazaar - Distributed version control system with an easy migration path from subversion.

    I spent most of yesterday learning about RSpec. Fun stuff, even if I can’t get the TextMate integration to work yet.

    • A Meme I’d Like To Crush - Greg Wilson, who actually knows a thing or two on the subject, discusses the current swooning over Erlang ’cause it’s so parallelizable.
    • Merb 0.4.2 released. - Just as I get interested, they push out a new version. The difference between open source software and a red queen’s race would be? (That’s a trick question.)
    • RSpec 1.1 - A significant release of the latest piece of software that I’m trying to spend quality time with.
    • Campfire Notifier for Cruise Control - I’m not actually using either Campfire or Cruise Control anywhere at the moment, but if I was, this would be cool.
    • Using Git with SVN - All of a sudden I’m seeing a lot of references to using git for source code control instead of svn. Looks like it’s reasonably possible to bridge the two.
    • Updating RubyGems and Rails in Leopard - I wonder if this would cure some of the versionitis I’m having on one of my dev boxes. Probably not, because I think I compiled everything from source on that box in the first place.
    • GoogleCharts - I figured someone would wrap up the new Google Charting API in a nice gem for Ruby & Rails. I wasn’t disappointed.
    • Using SSH Agent With Mac OS X Leopard - Came in handy for me as I switched over to letting Leopard be my ssh agent.
    • Google Maps API Icon Shadowmaker - This is going to come in handy on the site where I’m using Google Maps for a client.
    • BitNami - Pre-packaged install stacks for a lot of open source apps across a variety of operating systems. They have a Ruby and Rails package that provides an alternative to Instant Rails. (via Anthony Eden)
    • jrubyhub.com - More JRuby resources than you can shake a stick at.

    We now return you to our regularly scheduled program of linkage.

    Had to figure out how to rework my Rails login stuff to work with MD5 instead of SHA last night, as MD5 is pretty much the only hashing that LSL supports. Fortunately, this was a simple change despite the alphabet soupness of it all.

    • CruiseControl.rb - Continuous integration for Ruby. When my Rails code gets a bit more mature, I must look into this. (via Toolman Tim)
    • Describe it with RSpec - The RSpec behavior definition framework is another piece that I really should dig into some day.
    • How To Install Zimbra Collaboration Suite (ZCS) On Ubuntu - For a few brief moments I thought about this, but I really don’t need a collaboration server right at the moment. Maybe when I manage to wean the rest of the users on my network off of Exchange this will come in handy.