Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@typeoneerror
Last active August 29, 2017 18:25
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 typeoneerror/964995469f70782a421eac7af5dc2d31 to your computer and use it in GitHub Desktop.
Save typeoneerror/964995469f70782a421eac7af5dc2d31 to your computer and use it in GitHub Desktop.
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