Skip to content

Commit

Permalink
Merge pull request #67 from duleorlovic/master
Browse files Browse the repository at this point in the history
Add example to README for external servers
  • Loading branch information
phillbaker authored Jan 16, 2020
2 parents 1428d6a + 3f609ae commit 7a40f5e
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 7a40f5e

Please sign in to comment.