Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Library/Homebrew/test/hardware_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
require "hardware"

module Hardware
describe CPU do
describe "::type" do
it "returns the current CPU's type as a symbol, or :dunno if it cannot be detected" do
expect(
[
:intel,
:ppc,
:dunno,
],
).to include(described_class.type)
end
end

describe "::family" do
it "returns the current CPU's family name as a symbol, or :dunno if it cannot be detected" do
skip "Needs an Intel CPU." unless described_class.intel?

expect(
[
:core,
:core2,
:penryn,
:nehalem,
:arrandale,
:sandybridge,
:ivybridge,
:haswell,
:broadwell,
:skylake,
:kabylake,
:dunno,
],
).to include(described_class.family)
end
end
end
end
15 changes: 0 additions & 15 deletions Library/Homebrew/test/hardware_test.rb

This file was deleted.