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