Skip to content

Instantly share code, notes, and snippets.

@guenter
guenter / api.feature
Created June 24, 2010 17:55
Snippets for testing REST APIs with Cucumber and friends
Feature: API
In order to use the service from third party apps
As a user
I want to be able to use an API
Background:
Given a user exists # Pickle
And I login as the user using basic auth
Scenario Outline: Get a ticket
http://snippets.dzone.com/posts/show/5364
Strftime to get the ISO 8601 (see RFC 3339) full date format for an hEvent Microformat. Doubtless usable in other situations.
strftime('%Y-%m-%dT%H:%M:%S%z');
If you're in Ruby, you can access this the quick way with:
$ irb
>> require 'time'