Skip to content

Instantly share code, notes, and snippets.

@jgarber
Created December 14, 2011 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jgarber/1474739 to your computer and use it in GitHub Desktop.
Save jgarber/1474739 to your computer and use it in GitHub Desktop.
Example refactoring for Greg's Rspec talk
describe TournamentRegistration do
it "should parameterize itself with id" do
registration = Factory.create(:tournament_registration, :team_name => "Mighty Badgers")
registration.to_param.should == "#{registration.id}-mighty-badgers"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment