Skip to content

Instantly share code, notes, and snippets.

Created July 16, 2015 14:22
Show Gist options
  • Save anonymous/592f2f0d3555f42f1a8c to your computer and use it in GitHub Desktop.
Save anonymous/592f2f0d3555f42f1a8c to your computer and use it in GitHub Desktop.
Given(:array){ [:a,:b,:c] }
Given(:old_array){ array }
When { array.clear }
Then { expect(array).to eq [] } # passes
Then { expect(old_array).to eq [:a,:b,:c] } # fails, even old array is equal to []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment