Sha256: f4fde7a90d8528ab1e375c4a01bd2d97b98a92f0bfcb3b91d4acf9d9b12c2355
Contents?: true
Size: 715 Bytes
Versions: 13
Compression:
Stored size: 715 Bytes
Contents
require 'spec_helper' require 'rainbow/wrapper' module Rainbow describe Wrapper do let(:wrapper) { described_class.new(enabled) } it "is enabled by default" do expect(described_class.new.enabled).to be(true) end describe '#wrap' do subject { wrapper.wrap(object) } let(:object) { Object.new } context "when wrapping is enabled" do let(:enabled) { true } it { should eq(object.to_s) } it { should be_kind_of(Rainbow::Presenter) } end context "when wrapping is disabled" do let(:enabled) { false } it { should eq(object.to_s) } it { should be_kind_of(Rainbow::NullPresenter) } end end end end
Version data entries
13 entries across 13 versions & 4 rubygems