Sha256: b7a4d4c10aeba8869bc117e75a246ded5b26835c453330d918218c73756a3388

Contents?: true

Size: 559 Bytes

Versions: 27

Compression:

Stored size: 559 Bytes

Contents

describe Ppl::Adapter::Color::Colored do

  before(:each) do
    @adapter = Ppl::Adapter::Color::Colored.new
  end

  describe "#colorize" do

    it "should colorize the string using the monkeypatched String method" do
      string = "example"
      string.should_receive(:red).and_return("red example")
      @adapter.colorize(string, "red").should eq "red example"
    end

    it "should only attempt to colorize the string if the color exists" do
      string = "example"
      @adapter.colorize(string, "neon").should eq "example"
    end

  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
ppl-3.0.1 spec/ppl/adapter/color/colored_spec.rb
ppl-3.0.0 spec/ppl/adapter/color/colored_spec.rb
ppl-2.4.1 spec/ppl/adapter/color/colored_spec.rb
ppl-2.4.0 spec/ppl/adapter/color/colored_spec.rb
ppl-2.3.3 spec/ppl/adapter/color/colored_spec.rb
ppl-2.3.2 spec/ppl/adapter/color/colored_spec.rb
ppl-2.3.1 spec/ppl/adapter/color/colored_spec.rb
ppl-2.3.0 spec/ppl/adapter/color/colored_spec.rb
ppl-2.2.0 spec/ppl/adapter/color/colored_spec.rb
ppl-2.1.0 spec/ppl/adapter/color/colored_spec.rb
ppl-2.0.0 spec/ppl/adapter/color/colored_spec.rb
ppl-1.25.0 spec/ppl/adapter/color/colored_spec.rb
ppl-1.24.0 spec/ppl/adapter/color/colored_spec.rb
ppl-1.23.0 spec/ppl/adapter/color/colored_spec.rb
ppl-1.22.2 spec/ppl/adapter/color/colored_spec.rb
ppl-1.22.1 spec/ppl/adapter/color/colored_spec.rb
ppl-1.22.0 spec/ppl/adapter/color/colored_spec.rb
ppl-1.21.0 spec/ppl/adapter/color/colored_spec.rb
ppl-1.20.0 spec/ppl/adapter/color/colored_spec.rb
ppl-1.19.0 spec/ppl/adapter/color/colored_spec.rb