Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes specs broken on BSD #4781

Merged
merged 1 commit into from Aug 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/std/socket_spec.cr
Expand Up @@ -538,13 +538,13 @@ describe TCPSocket do
end

it "fails when host doesn't exist" do
expect_raises(Socket::Error, /No address found for doesnotexist.example.org.:12345/) do
expect_raises(Socket::Error, /No address/i) do
TCPSocket.new("doesnotexist.example.org.", 12345)
end
end

it "fails (rather than segfault on darwin) when host doesn't exist and port is 0" do
expect_raises(Socket::Error, /No address found for doesnotexist.example.org.:0/) do
expect_raises(Socket::Error, /No address/i) do
TCPSocket.new("doesnotexist.example.org.", 0)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/std/system_spec.cr
Expand Up @@ -13,7 +13,7 @@ describe System do

describe "cpu_count" do
it "returns current CPU count" do
shell_cpus = `getconf _NPROCESSORS_ONLN || nproc --all || grep -c '^processor' /proc/cpuinfo`.to_i
shell_cpus = `getconf _NPROCESSORS_ONLN || nproc --all || grep -c '^processor' /proc/cpuinfo || sysctl -n hw.ncpu`.to_i
cpu_count = System.cpu_count
cpu_count.should eq(shell_cpus)
end
Expand Down