Skip to content

Instantly share code, notes, and snippets.

@itzsaga
Created March 9, 2017 04:36
Show Gist options
  • Save itzsaga/bab70efeddfce6a3e28098cfa8b2fb96 to your computer and use it in GitHub Desktop.
Save itzsaga/bab70efeddfce6a3e28098cfa8b2fb96 to your computer and use it in GitHub Desktop.
# Question 4 Bonus
describe 'swap_elements_from_to' do
it 'swaps elements and allows you to specify the index of the element you would like to move to a new index' do
expect(swap_elements_from_to(["one", "two", "three"], 2, 1)).to eq(["one", "three", "two"])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment