okitan / capybara-json

60 stars 23 forks source link

Add support for Capybara::Session #14

Open Aetherus opened 9 years ago

Aetherus commented 9 years ago

When I run

@session = Capybara::Session.new(:rack_test_json)
@session.post('/some/path', {some: 'data'})

It just gives me NoMethodError: undefined method 'post' for #<Capybara::Session>. The same for other HTTP verbs and .json and .raw_json.

When I design an web api for some sort of workflow, it's essential to write tests for cooperation among people who don't share sessions. Please think of adding support for Capybara::Session or implement something similar.

sonots commented 9 years ago

Patches are welcome!