Nock
• HTTP mocking library
• Ruby Ͱݴ͏webmock
• μϛʔͷ HTTP ϨεϙϯεΛฦ͢
pgte/nock
describe 'Namesh', ->
urlBase = 'http://tokyo-ame.jwa.or.jp'
body =
'Amesh.setIndexList(["201510190110","201510190105","201510190100","201510190055","2015
10190050","201510190045","201510190040","201510190035","201510190030","201510190025","
201510190020","201510190015","201510190010","201510190005","201510190000","20151018235
5","201510182350","201510182345","201510182340","201510182335","201510182330","2015101
82325","201510182320","201510182315","201510182310"]);'
describe '#indices', ->
beforeEach( ->
nock(urlBase)
.get '/scripts/mesh_index.js'
.reply 200, body
)