Sha256: dcba29aca6febfa04436c564e9860879b19e852f63e65dbf01feb85a9f980f36
Contents?: true
Size: 733 Bytes
Versions: 6
Compression:
Stored size: 733 Bytes
Contents
require 'spec_helper' describe Jasmine::Headless do describe '.warn' do let(:output) { StringIO.new } before do described_class.stubs(:output).returns(output) end context 'warnings enabled' do before do described_class.stubs(:show_warnings?).returns(true) end it 'should work' do described_class.warn("warning") output.rewind output.read.should == "warning\n" end end context 'warnings disabled' do before do described_class.stubs(:show_warnings?).returns(false) end it 'should work' do described_class.warn("warning") output.rewind output.read.should == "" end end end end
Version data entries
6 entries across 6 versions & 2 rubygems