File tree Expand file tree Collapse file tree 2 files changed +40
-15
lines changed Expand file tree Collapse file tree 2 files changed +40
-15
lines changed Original file line number Diff line number Diff line change 1+ require "hardware"
2+
3+ module Hardware
4+ describe CPU do
5+ describe "::type" do
6+ it "returns the current CPU's type as a symbol, or :dunno if it cannot be detected" do
7+ expect (
8+ [
9+ :intel ,
10+ :ppc ,
11+ :dunno ,
12+ ] ,
13+ ) . to include ( described_class . type )
14+ end
15+ end
16+
17+ describe "::family" do
18+ it "returns the current CPU's family name as a symbol, or :dunno if it cannot be detected" do
19+ skip "Needs an Intel CPU." unless described_class . intel?
20+
21+ expect (
22+ [
23+ :core ,
24+ :core2 ,
25+ :penryn ,
26+ :nehalem ,
27+ :arrandale ,
28+ :sandybridge ,
29+ :ivybridge ,
30+ :haswell ,
31+ :broadwell ,
32+ :skylake ,
33+ :kabylake ,
34+ :dunno ,
35+ ] ,
36+ ) . to include ( described_class . family )
37+ end
38+ end
39+ end
40+ end
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments