Sha256: 19e732c307011b92e9d0f9d80dcb8a128f5456f76cd6e20d59daa5e01f4240c6

Contents?: true

Size: 428 Bytes

Versions: 10

Compression:

Stored size: 428 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe TTY::Table::BorderOptions, '.update' do

  let(:object) { described_class.new }

  let(:params) { {characters: {top: '*'}, separator: '|', style: :red} }

  subject { object.update(params) }

  it 'sets properties from hash object' do
    expect(subject.characters).to eq({top: '*'})
    expect(subject.separator).to eq('|')
    expect(subject.style).to eq(:red)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tty-table-0.10.0 spec/unit/border_options/update_spec.rb
tty-table-0.9.0 spec/unit/border_options/update_spec.rb
tty-table-0.8.0 spec/unit/border_options/update_spec.rb
tty-table-0.7.0 spec/unit/border_options/update_spec.rb
tty-table-0.6.0 spec/unit/border_options/update_spec.rb
tty-table-0.5.0 spec/unit/border_options/update_spec.rb
tty-table-0.4.0 spec/unit/border_options/update_spec.rb
tty-table-0.3.0 spec/unit/border_options/update_spec.rb
tty-table-0.2.0 spec/unit/border_options/update_spec.rb
tty-table-0.1.0 spec/unit/border_options/update_spec.rb