Sha256: 5ae3b7e22e6020b080dc5985f649a1c3359152f7b88f03ea78aa474914a4333a
Contents?: true
Size: 962 Bytes
Versions: 5
Compression:
Stored size: 962 Bytes
Contents
#enconding: utf-8 require 'spec_helper' describe Sample do it "takes nothing by default" do expect { Sample.new() }.to_not raise_error end it "takes data, keywords, exceptions, tags" do data = %w{ data } keywords = %w{ keywords } exceptions = %w{ exceptions } tag = 'this is a tag' sample = Sample.new(data, keywords, exceptions, tag) expect(sample.data).to eq(data) expect(sample.keywords).to eq(Set.new(keywords)) expect(sample.exceptions).to eq(Set.new(exceptions)) expect(sample.tag).to eq(tag) end it "takes singular values and return them into arrays" do data = 'data' keywords = 'keywords' exceptions = 'exceptions' sample = Sample.new(data, keywords, exceptions) expect(sample.data).to eq([ data ]) expect(sample.keywords).to eq(Set.new( [ keywords ] ) ) expect(sample.exceptions).to eq(Set.new( [ exceptions ] ) ) end end
Version data entries
5 entries across 5 versions & 1 rubygems