diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2019-04-14 13:56:57 +0300 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2019-04-14 15:46:04 +0300 |
commit | cc20804e36d84226d4ddfc5c8f62ac01c71bfb79 (patch) | |
tree | 9912e43d81bb5e5c2f06947294638dc96d282d0f /spec | |
parent | e28174853adc7fd2bcdb78b480b512158ecdc84f (diff) | |
download | pry-cc20804e36d84226d4ddfc5c8f62ac01c71bfb79.tar.gz |
config: factor out color printer proc to ColorPrinter
Diffstat (limited to 'spec')
-rw-r--r-- | spec/color_printer_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/color_printer_spec.rb b/spec/color_printer_spec.rb index 13b2acf6..8347a348 100644 --- a/spec/color_printer_spec.rb +++ b/spec/color_printer_spec.rb @@ -1,6 +1,16 @@ RSpec.describe Pry::ColorPrinter do let(:output) { StringIO.new } + describe ".default" do + let(:output) { StringIO.new } + let(:pry_instance) { Pry.new(output: output) } + + it "prints output prefix with value" do + described_class.default(StringIO.new, 'foo', pry_instance) + expect(output.string).to eq("=> \"foo\"\n") + end + end + describe ".pp" do context "when no exception is raised in #inspect" do let(:healthy_class) do |