2010-07-06 00:05:47 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe 'Httparty patches' do
|
|
|
|
|
|
|
|
describe 'Crack patch' do
|
|
|
|
|
|
|
|
context '#parsing json' do
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-06 00:05:47 +00:00
|
|
|
it 'fixes an issue about json input beginning by a variable declaration' do
|
|
|
|
lambda {
|
|
|
|
Crack::JSON.parse('var json = { "foo": 42 };')
|
|
|
|
}.should_not raise_error
|
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-06 00:05:47 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
2010-07-06 00:05:47 +00:00
|
|
|
end
|
2010-07-23 20:09:54 +00:00
|
|
|
|
|
|
|
end
|