Skip to content

Instantly share code, notes, and snippets.

@dan-palmer
Created October 12, 2015 11:33
Show Gist options
  • Save dan-palmer/1d0a1d538af0014903bb to your computer and use it in GitHub Desktop.
Save dan-palmer/1d0a1d538af0014903bb to your computer and use it in GitHub Desktop.
require 'minitest/autorun'
# This should pass..
describe 'Immutable prison data' do
let(:prison_name) { 'Wandsworth' }
def test_data_is_treated_immutable
prison1 = Prison.find prison_name
prison1.slots = []
prison2 = Prison.find prison_name
refute_equal prison1.slots, prison2.slots
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment