Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drewolson/timebomb
make your cucumber step definitions time aware
https://github.com/drewolson/timebomb
Last synced: about 1 month ago
JSON representation
make your cucumber step definitions time aware
- Host: GitHub
- URL: https://github.com/drewolson/timebomb
- Owner: drewolson
- License: mit
- Created: 2009-11-14T23:06:17.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2009-11-15T17:10:32.000Z (about 15 years ago)
- Last Synced: 2024-05-09T21:50:03.067Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= timebomb
If you're like me, you've found yourself with a cucumber
step definition like this:Given /^I recieved an invitation$/ do
...
endAnd you want to write a step definition like this:
Given /^I recieved an invitation 2 days ago$/ do
...
endWell, timebomb to the rescue. It lets you append
time constraints to your cucumber step defintions by
mixing and matching:- seconds, minutes, hours, days, weeks, months, years
- ago, from nowSo with the following step definition:
Given /^I recieved an invitation$/ do
...
endI can write any of the following:
Given I received an invitation 1 day from now
Given I received an invitation 2 weeks ago
Given I received an invitation 3 months from now
Given I received an invitation 15 years agoTimebomb to the rescue, BOOM!
== Installing
Make sure you have gemcutter as your default source:
sudo gem install gemcutter
gem tumbleFirst install Timebomb
sudo gem install timebomb
Now, just require it in your cucumber env.rb file.
BOOM goes the dynamite.== Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but
bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.== Copyright
Copyright (c) 2009 Drew Olson. See LICENSE for details.