Skip to content

Instantly share code, notes, and snippets.

@jcarnegie
Created February 28, 2009 20:14
Show Gist options
  • Save jcarnegie/72092 to your computer and use it in GitHub Desktop.
Save jcarnegie/72092 to your computer and use it in GitHub Desktop.
mytest
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Person do
it "should not be valid without last name" do
p = Person.new :first_name => "blah"
p.should have_at_least(1).error_on(:last_name)
end
it "should measure length of string" do
"asdf".should have(4).characters
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment