Skip to content

Instantly share code, notes, and snippets.

@jeroenvandijk
Created May 16, 2010 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroenvandijk/403156 to your computer and use it in GitHub Desktop.
Save jeroenvandijk/403156 to your computer and use it in GitHub Desktop.
[ :json, :xml ].each do |format|
test "should clear errors when error is corrected for #{format}" do
set_mocks_to_invalid
invalid_user_using_format(format) do
assert !@person.valid?
@person.name = "Joe Shmoe"
@person.age = 56
set_mocks_to_valid
assert @person.save
assert @person.valid?
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment