Sha256: 1beb09c9beb39173a575a4b3809a1886b1dfa73d3adf8cd73dadcacd39ef0565
Contents?: true
Size: 679 Bytes
Versions: 4
Compression:
Stored size: 679 Bytes
Contents
# coding: utf-8 require 'spec_helper' RSpec.describe TTY::Table, '#eql?' do let(:rows) { [['a1', 'a2'], ['b1', 'b2']] } let(:object) { described_class.new rows } subject { object.eql?(other) } describe '#inspect' do it { expect(object.inspect).to match /#<TTY::Table/ } end context 'with the same object' do let(:other) { object } it { is_expected.to eql(true) } it 'is symmetric' do is_expected.to eql(other.eql?(object)) end end context 'with an equivalent object' do let(:other) { object.dup } it { is_expected.to eql(true) } it 'is symmetric' do is_expected.to eql(other.eql?(object)) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
tty-table-0.4.0 | spec/unit/eql_spec.rb |
tty-table-0.3.0 | spec/unit/eql_spec.rb |
tty-table-0.2.0 | spec/unit/eql_spec.rb |
tty-table-0.1.0 | spec/unit/eql_spec.rb |