Skip to content

Commit

Permalink
Cleanup ENV setup for specs
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Sep 24, 2024
1 parent 79b99de commit 34257ee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/close_encounters_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ class CloseEncountersTest < ActiveSupport::TestCase
fixtures :all

test ".auto_contact? returns true if the environment variable is set" do
begin
ENV["CLOSE_ENCOUNTERS_AUTO_CONTACT"] = "true"
_(CloseEncounters.auto_contact?).must_equal true
ensure
ENV.delete("CLOSE_ENCOUNTERS_AUTO_CONTACT")
end
ENV["CLOSE_ENCOUNTERS_AUTO_CONTACT"] = "true"
_(CloseEncounters.auto_contact?).must_equal true
ensure
ENV.delete("CLOSE_ENCOUNTERS_AUTO_CONTACT")
end

test ".auto_contact? returns false if the environment variable is not set" do
ENV.delete("CLOSE_ENCOUNTERS_AUTO_CONTACT")
_(CloseEncounters.auto_contact?).must_equal false
end

Expand Down

0 comments on commit 34257ee

Please sign in to comment.