From 6be1def3544ba8ea942a6bb3328d50a4fe0c8b2f Mon Sep 17 00:00:00 2001 From: Manabu Niseki Date: Wed, 27 Mar 2019 19:11:51 +0900 Subject: [PATCH] chore: switch puts with print --- lib/kokki/cli.rb | 2 +- spec/cli_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kokki/cli.rb b/lib/kokki/cli.rb index 71d1e22..cfa499f 100644 --- a/lib/kokki/cli.rb +++ b/lib/kokki/cli.rb @@ -5,7 +5,7 @@ class CLI def self.start(input) if input begin - puts Kokki.flagize(input.chomp) + print Kokki.flagize(input.chomp) rescue Kokki::InvalidInputError => e puts e.message end diff --git a/spec/cli_spec.rb b/spec/cli_spec.rb index b32b823..ff7188c 100644 --- a/spec/cli_spec.rb +++ b/spec/cli_spec.rb @@ -6,7 +6,7 @@ describe ".start" do context "when given a valid input" do it "should return a country flag of a given country" do - output = capture(:stdout) { subject.start "JP" }.chomp + output = capture(:stdout) { subject.start "JP" } expect(output).to eq("🇯🇵") end end