Sha256: ffcecf00a41ba9c87669e48abeabb8177713c4b41835a4661332065484c39523

Contents?: true

Size: 1003 Bytes

Versions: 13

Compression:

Stored size: 1003 Bytes

Contents

# Testing

## Integration Tests

Integration tests (feature specs) are run against a local IMAP server
controlled by Docker Compose, which needs to be started
before running the test suite.

```sh
$ docker-compose up -d
```

```sh
$ rake
```

To exclude Docker-based tests:

```sh
rake no-docker
```

or

```sh
$ rspec --tag ~docker
```

## Access Docker imap server

```ruby
require "net/imap"

imap = Net::IMAP.new("localhost", {port: 8993, ssl: {verify_mode: 0}})
username = "address@example.org"
imap.login(username, "pass")

message = "From: #{username}\nSubject: Some Subject\n\nHello!\n"
response = imap.append("INBOX", message, nil, nil)

imap.examine("INBOX")
uids = imap.uid_search(["ALL"]).sort

fetch_data_items = imap.uid_fetch(uids, ["BODY[]"])
```

# Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
imap-backup-5.2.0 docs/development.md
imap-backup-5.1.0 docs/development.md
imap-backup-5.0.0 docs/development.md
imap-backup-4.2.2 docs/development.md
imap-backup-4.2.1 docs/development.md
imap-backup-4.2.0 docs/development.md
imap-backup-4.1.2 docs/development.md
imap-backup-4.1.1 docs/development.md
imap-backup-4.0.7 docs/development.md
imap-backup-4.0.6 docs/development.md
imap-backup-4.0.5 docs/development.md
imap-backup-4.0.4 docs/development.md
imap-backup-4.0.3 docs/development.md