Skip to content

Commit 11b982b

Browse files
committed
fixup! Allow disabling of all network accesses
1 parent e03ef04 commit 11b982b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spec/client_spec.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@
3939
end.to raise_error(described_class::BadCredentialsError)
4040
end
4141

42-
before { ENV["PAGES_DISABLE_NETWORK"] = nil }
43-
4442
it "supresses network accesses if requested" do
4543
WebMock.disable_net_connect!
4644

47-
ENV["PAGES_DISABLE_NETWORK"] = "1"
48-
expect(subject.contributors("jekyll/github-metadata")).to be(false)
45+
with_env("PAGES_DISABLE_NETWORK", "1") do
46+
expect(subject.contributors("jekyll/github-metadata")).to be(false)
47+
end
4948
end
5049

5150
it "allows network accesses by default" do

0 commit comments

Comments
 (0)