Sha256: 769ea75da06c9879fe32e8b71afbdd4880f44c012831a7e65b89b3a6974a98de

Contents?: true

Size: 374 Bytes

Versions: 3

Compression:

Stored size: 374 Bytes

Contents

require 'spec_helper'
require 'katapult/model'
require 'katapult/attribute'

describe Katapult::Model do

  subject { described_class.new('model') }

  describe '#label_attr' do
    it 'returns the model’s first attribute' do
      subject.attr('first_attr')
      subject.attr('second_attr')

      expect(subject.label_attr.name).to eql('first_attr')
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
katapult-0.1.2 spec/model_spec.rb
katapult-0.1.1 spec/model_spec.rb
katapult-0.1.0 spec/model_spec.rb