Sha256: b10c07f8474b228aa6ca8d719620cf363bcd317947e6752464d6b1935c899837
Contents?: true
Size: 955 Bytes
Versions: 16
Compression:
Stored size: 955 Bytes
Contents
require "spec_helper" describe Her::Collection do let(:items) { [1, 2, 3, 4] } let(:metadata) { { name: "Testname" } } let(:errors) { { name: ["not_present"] } } describe "#new" do context "without parameters" do subject { Her::Collection.new } it { is_expected.to eq([]) } describe "#metadata" do subject { super().metadata } it { is_expected.to eq({}) } end describe "#errors" do subject { super().errors } it { is_expected.to eq({}) } end end context "with parameters" do subject { Her::Collection.new(items, metadata, errors) } it { is_expected.to eq([1, 2, 3, 4]) } describe "#metadata" do subject { super().metadata } it { is_expected.to eq(name: "Testname") } end describe "#errors" do subject { super().errors } it { is_expected.to eq(name: ["not_present"]) } end end end end
Version data entries
16 entries across 16 versions & 1 rubygems