Sha256: 81ff7b1455db6dfec85886c56e2c76d0d8a4195011599467897ae25ccd2f68f1
Contents?: true
Size: 615 Bytes
Versions: 5
Compression:
Stored size: 615 Bytes
Contents
# frozen_string_literal: true require 'fuubar' class TestNonTtyOutputClass def tty? false end end class TestTtyOutputClass def hello 'hello' end def tty? true end end class Fuubar < RSpec::Core::Formatters::BaseTextFormatter describe Output do it 'delegates anything to the passed in object' do output = Output.new(TestTtyOutputClass.new) expect(output.hello).to eql 'hello' expect(output).to be_tty end it 'can override the TTY of the passed in class' do output = Output.new(TestNonTtyOutputClass.new, true) expect(output).to be_tty end end end
Version data entries
5 entries across 5 versions & 1 rubygems