Skip to content

Make it easier to access submitted data #61

@betesh

Description

@betesh

Right now, if I want to verify that I'm POST'ing the right data, I need to do something like this:

FakeWeb.register_uri(:post, my_url, body: 'i-dont-care-about-the-response-only-the-request')
do_something_that_hits_my_url
request_data = CGI.parse FakeWeb.last_request.body_stream.instance_variable_get('@stream').string
expect(request_data).to ...

Line 3 of this example should be encapsulated. For instance, it could be exposed as FakeWeb.last_request.form_data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions