Sha256: a78c7cfbc4fe5a5a69d88c6b28ae8490a020ec4930d0e7cd657ecc9c89f311ba
Contents?: true
Size: 552 Bytes
Versions: 30
Compression:
Stored size: 552 Bytes
Contents
require "./spec_helper" private def event_hash { "body" => nil, "context" => nil, "headers" => {"Content-Type" => "application/json"}, "query_params" => {} of String => String } end private def event Event.from_json(event_hash.to_json) end describe "handler(event)" do it "should return String" do body = handler(event).body body.should be_a String end it "should say Hello, World!" do event = Event.from_json(event_hash.to_json) body = handler(event).body body.should eq("Hello, World!\n") end end
Version data entries
30 entries across 30 versions & 1 rubygems