byroot/ruby-osdb — pull request #10 by antonio (2012-11-03 18:41:15+00:00)
Title: Don't depend on a connection to run the tests

A couple days ago the tests were failing for me because I was not connected to any network, and so realized that requests to opensubtitles.org were being done in the server specs.

I have included [VCR](https://github.com/myronmarston/vcr) and [WebMock](https://github.com/bblimke/webmock) in the gem specification and modified the server specs to use them. Now, there is no dependency with the OS server (which is also slow and sometimes fails for no apparent reason).

Also, tests now run much more faster, benchmarks below:

```
% rspec spec
............................

Finished in 31.42 seconds
28 examples, 0 failures
```

```
% rspec spec
............................

Finished in 0.22798 seconds
28 examples, 0 failures
```