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