Skip to content

Commit

Permalink
Add example to README for external servers
Browse files Browse the repository at this point in the history
This example will help all users that follow README but did not come across phillbaker#66
  • Loading branch information
duleorlovic authored Jan 12, 2020
1 parent 1428d6a commit 3f609ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@ Capybara.register_driver :mechanize do |app|
driver
end
```
### Usage without rack app

You can configure it to use for external servers. Until this issue https://github.com/jeroenvandijk/capybara-mechanize/issues/66 is resolved, you can configure with
```
Capybara.register_driver :mechanize do |app|
Capybara::Mechanize::Driver.new(proc {})
end
```
and use like this
```
session = Capybara::Session.new :mechanize
session.visit 'https://github.com'
```
### Usage with Cucumber and tags

A @mechanize tag is added to your hooks when you add the following line to your env.rb
Expand Down

0 comments on commit 3f609ae

Please sign in to comment.