Skip to content

Instantly share code, notes, and snippets.

@joel-costigliola
Last active October 3, 2015 04:48
Show Gist options
  • Save joel-costigliola/2393444 to your computer and use it in GitHub Desktop.
Save joel-costigliola/2393444 to your computer and use it in GitHub Desktop.
Regexp to migrate Fest 1.4 onProperty usage to Fest 2.0 extractProperty + from with
Search with regexp: assertThat\((.*?)\).onProperty\((.*?)\)
Replace by : assertThat(extractProperty(\2).from(\1))
For example, it will change:
assertThat(fellowshipOfTheRing).onProperty("name").contains("Boromir", "Gandalf", "Frodo", "Legolas"); // Fest 1.4
To :
assertThat(extractProperty("name").from(fellowshipOfTheRing)).contains("Boromir", "Gandalf", "Frodo", "Legolas"); // Fest 2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment