Sha256: 16967fe5305b38258b4d5d703fd74f0f37f586c6ef495945e44b26578be9942e
Contents?: true
Size: 579 Bytes
Versions: 2
Compression:
Stored size: 579 Bytes
Contents
describe Slack::Base do describe "#parse_all" do let(:responses) do [ double(:response, body: '{ "ok": true, "messages": [{ "id": "1234", "type": "blah" }] }'), double(:response, body: '{ "ok": true, "messages": [{ "id": "4567", "type": "bleh" }] }') ] end it "parses all of the messages in an array" do result = described_class.parse_all responses, 'messages' expect(result.count).to eq 2 expect(result.first.id).to eq "1234" expect(result.last.id).to eq "4567" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
laziness-0.2.6 | spec/laziness/base_spec.rb |
laziness-0.2.5 | spec/laziness/base_spec.rb |