ngty
Login ngty
Website http://tyenglog.blogspot.com
-1 votes
3 comments
2747 views
Macro-writing is a great way to keep ur specs beautiful, compact & readable, & keeps specs writing fun. Macro-writing isn't rocket science, everyone can do it (almost, i think).
-4 votes
12 comments
1578 views
Writing specs for 3rd party declaratives
Using declaratives (eg. acts_as_authentic) provided by external libs is unavoidable in building a rails application. But testing 3rd party libs is surely not part of our work, yet how do we rest assured that these declaratives are called ??
5 votes
1 comments
1562 views
Use nested step to improve readability of ur scenario
When a scenario has too many steps, it becomes hard to read & follow. Using nested step helps to clean up the scenario, & helps promote reusability of groups of steps, think of it as code refactoring.
9 votes
2 comments
1595 views
Use 'Background' to consolidate common steps in a feature
Very often, we tend to repeat a number of common steps in all scenarios within a feature, to dry things up, as well as improve readability (helping reader to better focus the intent of each scenario), we can use 'Background'.
3 votes
0 comments
1640 views
Use pickle & ur choice factory for data setup in ur cucumber features (revised)
Data setup is sometimes painful in features writing for cucumber. Use pickle & factory of ur choice to make it less painful.
7 votes
3 comments
6486 views
Use I18n.localize for date/time formating
For reliable formatting of a date/time string in the desired language, use I18n.localise, Time#strftime can cause u unnecessary headache.
