ryanb/letter_opener — pull request #85 by kmcphillips (2013-12-07 14:46:25+00:00)
Title: Fix deprecations and warnings in spec output

The tests are all passing, but the output is messy. The tests also use some deprecated rspec features which throw warnings. Output looks like:

```
~/C/R/letter_opener(master)$ bundle exec rspec
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}
......................DEPRECATION: `expect { }.not_to raise_error(SpecificErrorClass)` is deprecated. Use `expect { }.not_to raise_error` (with no args) instead. Called from /Users/kevinmcphillips/Code/Ruby/letter_opener/spec/letter_opener/delivery_method_spec.rb:32:in `block (4 levels) in '.
/usr/bin/open file:////Users/kevinmcphillips/Code/Ruby/letter_opener/tmp/letter_opener/1386427151_385c31e/plain.html
.DEPRECATION: `expect { }.not_to raise_error(SpecificErrorClass)` is deprecated. Use `expect { }.not_to raise_error` (with no args) instead. Called from /Users/kevinmcphillips/Code/Ruby/letter_opener/spec/letter_opener/delivery_method_spec.rb:45:in `block (4 levels) in '.
/usr/bin/open file:////Users/kevinmcphillips/Code/Ruby/letter_opener/tmp/letter_opener%20with%20space/1386427151_bf4fc7b/plain.html
............................DEPRECATION: mock is deprecated. Use double instead. Called from /Users/kevinmcphillips/Code/Ruby/letter_opener/spec/letter_opener/message_spec.rb:147:in `block (3 levels) in '.
DEPRECATION: mock is deprecated. Use double instead. Called from /Users/kevinmcphillips/Code/Ruby/letter_opener/spec/letter_opener/message_spec.rb:148:in `block (3 levels) in '.
.

Finished in 0.63647 seconds
52 examples, 0 failures

Randomized with seed 52632
```

I cleaned up the tests as follows: replaced `mock` with `double`, removed unneeded option in init, changed the `raise_error` expectation syntax, and added some missing tests. Output now looks like:

```
~/C/R/letter_opener(master)$ bundle exec rspec
......................................................

Finished in 0.64368 seconds
54 examples, 0 failures

Randomized with seed 52402
```