Sha256: c717f8e58f0745cbdf042926d1557d63cf63f5644d43d27cbb03b2816bfccf52
Contents?: true
Size: 366 Bytes
Versions: 23
Compression:
Stored size: 366 Bytes
Contents
require 'spec_helper' require 'napa/json_error' describe Napa::JsonError do context '#to_json' do it 'returns a json hash with the error data' do error = Napa::JsonError.new(:code, 'message').to_json parsed = JSON.parse(error) parsed['error']['code'].should eq('code') parsed['error']['message'].should eq('message') end end end
Version data entries
23 entries across 23 versions & 1 rubygems