Sha256: 5382573831e9507e09abbb664518998a220c5d503c1a43555e4a7526c2fd6457

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

shared_examples_for "optional model attributes include" do |set_of_attributes|
  set_of_attributes.each do |attribute|
    it attribute do
      expect(record.send(attribute)).to eql(optional_model_attributes[attribute])

      sans_attribute = model_options.reject {|k,_| k == attribute}
      expect(described_class.new(sans_attribute).send(attribute)).to be_nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opennorth-represent-0.1.0 spec/support/shared_examples/optional_model_attributes_include.rb