Skip to content

Commit 64e272d

Browse files
committed
add test for the board-is-installed function
1 parent effc510 commit 64e272d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
### Added
99
- `ArduinoInstallation` class for managing lib / executable paths
1010
- `DisplayManager` class for managing Xvfb instance if needed
11+
- `ArduinoCmd` can report on whether a board is installed
1112

1213
### Changed
1314
- `DisplayManger.with_display` doesn't `disable` if the display was enabled prior to starting the block

spec/arduino_cmd_spec.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,16 @@
1313
expect(arduino_cmd.installation.cmd_path).not_to be nil
1414
end
1515
end
16-
end
1716

17+
context "board_installed?" do
18+
arduino_cmd = ArduinoCI::ArduinoCmd.autolocate!
19+
ArduinoCI::DisplayManager::instance.enable
20+
it "Finds installed boards" do
21+
expect(arduino_cmd.board_installed? "arduino:avr:uno").to be true
22+
end
23+
24+
it "Doesn't find bogus boards" do
25+
expect(arduino_cmd.board_installed? "eggs:milk:wheat").to be false
26+
end
27+
end
28+
end

0 commit comments

Comments
 (0)