Skip to content

Commit

Permalink
Fix bug in not printing first newline in dlcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Tompkinson authored and Chris Tompkinson committed Jun 6, 2017
1 parent 9d2a85b commit afc90a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ Platforms: Mac, Xbox 360, PlayStation 3, PlayStation Network (PS3), PC, Android,
Released: 2012-09-18
Genres: Role-Playing, First-Person Shooter
Developers: Gearbox Software LLC
DLCs:\nBorderlands 2: Mechromancer
DLCs:
Borderlands 2: Mechromancer
Captain Scarlett and Her Pirate's Booty
Season Pass
Mister Torgue's Campaign of Carnage
Expand Down
2 changes: 1 addition & 1 deletion lib/game-finder/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def output(game)
if game['genres']
puts 'Developers: '.yellow + format_developers(game['developers']) \
if game['developers']
puts 'DLCs:\n'.yellow + format_dlcs(game['dlcs']) \
puts "DLCs:\n".yellow + format_dlcs(game['dlcs']) \
if game['dlcs']
end
end
2 changes: 1 addition & 1 deletion spec/game-finder/info_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
expect(i).to receive(:puts).with("\e[0;33;49mDevelopers: \e[0mEpic Games, " \
'The Coalition, Psyonix Studios')
expect(i).to receive(:puts).with("\e[0;33;49mGenres: \e[0mAction, Shooter")
expect(i).to receive(:puts).with("\e[0;33;49mDLCs:\\n\e[0m" \
expect(i).to receive(:puts).with("\e[0;33;49mDLCs:\n\e[0m" \
"Multiplayer Map Pack 1\n" \
'Hidden Fronts Map Pack')
i.output(JSON.parse(gears_game)['results'])
Expand Down

0 comments on commit afc90a0

Please sign in to comment.