Sha256: c41374a0c38fe596f5e4f60eadd912e4f91f0a7641d34a0107b535cf833ac0d7
Contents?: true
Size: 476 Bytes
Versions: 8
Compression:
Stored size: 476 Bytes
Contents
require 'spec_helper' describe NightcrawlerSwift::Ext::OpenStruct do let :hash do {key1: "value", key2: true} end subject do OpenStruct.new hash end describe "#to_h" do it "returns a hash with the content" do expect(subject.to_h).to eql hash end describe "for a blank object" do subject do OpenStruct.new end it "returns an empty hash" do expect(subject.to_h).to eql({}) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems