Sha256: d48d7ca59e747c4fdda706e71a555fe9c676069eae60471b36fbc0ac46b6f101
Contents?: true
Size: 614 Bytes
Versions: 2
Compression:
Stored size: 614 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fuubar-2.2.0 | spec/fuubar/output_spec.rb |
fuubar-2.1.1 | spec/fuubar/output_spec.rb |