Skip to content

Instantly share code, notes, and snippets.

@mattfitzgerald
Created February 17, 2012 01:28
Show Gist options
  • Save mattfitzgerald/1849557 to your computer and use it in GitHub Desktop.
Save mattfitzgerald/1849557 to your computer and use it in GitHub Desktop.
describe "modify_value" do
before(:all) do
@field = mock_account.database.fields.find_by_system_name('date_of_birth')
end
it "should not accept integer only dates" do
@field.modify_value('1').should == nil
end
it "should not accept dates with only two parts" do
@field.modify_value('3/4').should == nil
end
it "should not accept dates that are text only" do
@field.modify_value('moo').should == nil
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment