Sha256: 1bcde33648ad8111bea9aace75628c70790920cb5dbdc608d137d48875c62cd2

Contents?: true

Size: 399 Bytes

Versions: 9

Compression:

Stored size: 399 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe TTY::Table::Operation::Filter, '#call' do
  let(:object) { described_class }
  let(:field)  { TTY::Table::Field.new('a1') }
  let(:filter) { Proc.new { |val, row, col| 'new' } }
  let(:value)  { 'new' }

  subject(:operation) { object.new(filter) }

  it 'changes field value' do
    expect(operation.call(field, 0, 0)).to eql(value)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tty-table-0.10.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.9.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.8.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.7.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.6.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.5.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.4.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.3.0 spec/unit/operation/filter/call_spec.rb
tty-table-0.2.0 spec/unit/operation/filter/call_spec.rb