From 7c0cd9e0cb6251b78793f92a41f7377988d3e5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Wed, 8 Nov 2023 22:18:42 +0100 Subject: Spaces : strengthen #shift and #independent! --- lib/colonial_twilight/spaces.rb | 1 + spec/spaces_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/colonial_twilight/spaces.rb b/lib/colonial_twilight/spaces.rb index 6eaf3c7..d85954f 100644 --- a/lib/colonial_twilight/spaces.rb +++ b/lib/colonial_twilight/spaces.rb @@ -219,6 +219,7 @@ module ColonialTwilight def independent! @independent = true @descr.gsub!(/French/, 'Independent') + @independent end end end diff --git a/spec/spaces_spec.rb b/spec/spaces_spec.rb index d7af8e5..e1d75ca 100644 --- a/spec/spaces_spec.rb +++ b/spec/spaces_spec.rb @@ -94,14 +94,14 @@ describe ColonialTwilight::Sector do end it 'shift alignment toward oppose' do - @s.shift :oppose + expect(@s.shift(:oppose)).to be :oppose expect(@s.oppose?).to be true expect(@s.neutral?).to be false expect(@s.support?).to be false end it 'shift alignment toward support' do - @s.shift :support + expect(@s.shift(:support)).to be :support expect(@s.oppose?).to be false expect(@s.neutral?).to be false expect(@s.support?).to be true @@ -163,7 +163,7 @@ describe ColonialTwilight::Country do it 'independent' do expect(@c.independent?).to be false - @c.independent! + expect(@c.independent!).to be true expect(@c.independent?).to be true end end -- cgit v1.1-2-g2b99