Sha256: 94869215cbb81cc3eb483e59e9110929503ea2beeb6f6201e4db3e6c1cd33505

Contents?: true

Size: 721 Bytes

Versions: 2

Compression:

Stored size: 721 Bytes

Contents

require 'intuition/sheet'

describe Intuition::Sheet do
  describe '.new' do
    let(:title) { FFaker::Lorem.phrase  }
    it 'takes sheet title' do
      expect(described_class.new(title).title).to eq(title)
    end
  end

  describe '#header' do
    subject { described_class.new(FFaker::Lorem.phrase) }
    let(:header) { FFaker::Lorem.phrase }

    context 'with parameter' do
      it 'sets header' do
        subject.header header
        expect(subject.instance_variable_get(:@header)).to eq([header])
      end
    end
    context 'without parameter' do
      it 'gets header' do
        subject.instance_variable_set(:@header, [header])
        expect(subject.header).to eq([header])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
intuition-0.0.1.alpha2 spec/intuition/sheet_spec.rb
intuition-0.0.1.alpha1 spec/intuition/sheet_spec.rb