Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
unlock_tests = [
['ULLL', 'ULLL'], # first unlocked, do nothing
['LLLL', 'ULLL'], # first should be unlocked
['LULL', 'UULL'],
['LLUL', 'UUUL'],
['LLLU', 'UUUU'],
['UULL', 'UULL'],
['LUUL', 'UUUL'],
['LLUU', 'UUUU'],
['UUUL', 'UUUL'], # good state, do nothing
['LUUU', 'UUUU'],
['ULUL', 'UUUL'],
['LULU', 'UUUU']
]
context 'repairs unlocks in various states' do
unlock_tests.each do |unlock_test|
from = unlock_test.first
to = unlock_test.second
it "when state is #{from} the repaired state is #{to}" do
setup_unlock_state(from)
expect_unlocks(to)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment