-
-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c34b716
commit 32b9afd
Showing
2 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
require "locale" | ||
require "os/linux" | ||
|
||
RSpec.describe OS::Linux do | ||
describe "::languages", :needs_linux do | ||
it "returns a list of all languages" do | ||
expect(described_class.languages).not_to be_empty | ||
end | ||
end | ||
|
||
describe "::language", :needs_linux do | ||
it "returns the first item from #languages" do | ||
expect(described_class.language).to eq(described_class.languages.first) | ||
end | ||
end | ||
|
||
describe "::'os_version'", :needs_linux do | ||
it "returns the OS version" do | ||
expect(described_class.os_version).not_to be_empty | ||
end | ||
end | ||
|
||
describe "::'wsl?'" do | ||
it "returns the WSL state" do | ||
expect(described_class.wsl?).to be(false) | ||
end | ||
end | ||
|
||
describe "::'wsl_version'", :needs_linux do | ||
it "returns the WSL version" do | ||
expect(described_class.wsl_version).to match(Version::NULL) | ||
end | ||
end | ||
end |