mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
fix failing spec
Signed-off-by: John Nunemaker <nunemaker@gmail.com>
This commit is contained in:
parent
526f3c8fcc
commit
3e3d23383a
2 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ module HTTParty
|
|||
# format :json
|
||||
# end
|
||||
def format(f)
|
||||
raise UnsupportedFormat, "Must be one of: #{AllowedFormats.values.uniq.join(', ')}" unless AllowedFormats.value?(f)
|
||||
raise UnsupportedFormat, "Must be one of: #{AllowedFormats.values.map(&:to_s).uniq.sort.join(', ')}" unless AllowedFormats.value?(f)
|
||||
default_options[:format] = f
|
||||
end
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ describe HTTParty do
|
|||
it 'should only print each format once with an exception' do
|
||||
lambda do
|
||||
@klass.format :foobar
|
||||
end.should raise_error(HTTParty::UnsupportedFormat, "Must be one of: json, plain, html, yaml, xml")
|
||||
end.should raise_error(HTTParty::UnsupportedFormat, "Must be one of: html, json, plain, xml, yaml")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue