seancribbs/webmachine-ruby — pull request #202 by jfredett (2014-10-30 16:02:47+00:00)
Title: fix nil-reference issue in QuotedString module

fixes #201, `#quote` will no longer throw a nil-ref when passed a nil argument.

also adds specs for `Webmachine::QuotedString#quote` and `#unquote`. I didn't see any existing specs in the spec folder. There was one case where I encoded the current behavior, but think that maybe it should not behave this way:

````ruby

context 'when the string is nil' do
subject { unquote(nil) }

it { is_expected.to eq(nil) }
end
````

IMO, either this should return `""`, or `quote(nil)` should return `nil`, rather than `""`. The former is perhaps more convenient, the latter is so that the invariants

````ruby
quote(unquote(str)) == str
````
and

````ruby
unquote(quote(str)) == str
````

hold. Right now, if `str` is nil, it would get 'promoted' to an empty string. Not sure what is preferable there.