Skip to content

Instantly share code, notes, and snippets.

@yashke
Created January 19, 2012 12:47
Show Gist options
  • Save yashke/1639918 to your computer and use it in GitHub Desktop.
Save yashke/1639918 to your computer and use it in GitHub Desktop.
data = ServerResponses.initialData
# data.player.points = 10
# oh noes, we have ServerResponses.initialData infected
data = _.clone(data)
data.player = _.clone(data.player)
data.player.points = 10
server_mock.respondTo("GET /something", data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment