Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Interaction matcher improvements #144

Open
maxlinc opened this issue Jul 29, 2014 · 0 comments
Open

Interaction matcher improvements #144

maxlinc opened this issue Jul 29, 2014 · 0 comments
Labels

Comments

@maxlinc
Copy link
Collaborator

maxlinc commented Jul 29, 2014

Split examples in from #125

Add enhanced Interaction class and collection, to support matchers like:

      # RSpec 3
      # expect(interactions).to include(an_interaction_for('create something').with(size: 'large'))

      # RSpec 2
      expect(interactions.first).to be_an_interaction_for('create something').with(size: 'large')

      # Interactions may also (in the future) have some aggregate methods or advanced capabilities, like:
      interactions.slowest(5) # returns the 5 slowest HTTP request/response interactions
      interactions.group_by(&:service) # groups by service, in this case 'create something'
      # auto_cleanup detects interactions that match a "creation pattern" (like a PUT, a
      # or a POST that returned a 201 (possibly as part of a POST-REDIRECT-GET), and sends
      # a DELETE request to undo the creation action.
      interactions.auto_cleanup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant