payout / rester

An exceedingly quick way of creating restful interfaces between Ruby services.
https://www.payout.com
MIT License
2 stars 0 forks source link

Add rspec helper to validate formats for producer tests #93

Closed kayvonghaffari closed 8 years ago

kayvonghaffari commented 8 years ago
it 'should satisfy stub' do
  is_expected.to include_stub_response(
    created_at: /\A2[0-9]{3}-[01][0-9]-[0-3][0-9]T[012][0-9]:[0-5][0-9]:[0-5][0-9]\+00:00\z/
  )
end

This will check both the stub and the response against the regex.