Skip to content

Commit effc510

Browse files
committed
fix path for OSX
1 parent d736446 commit effc510

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

lib/arduino_ci/arduino_installation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def force_install_location
2828
def autolocate
2929
ret = new
3030

31-
osx_place = "/Applications/Arduino.app/Contents/MacOS/Arduino"
31+
osx_place = "/Applications/Arduino.app/Contents/MacOS"
3232
if File.exist? osx_place
33-
ret.cmd_path = File.join(osx_place, "arduino")
33+
ret.cmd_path = File.join(osx_place, "Arduino")
3434
ret.lib_dir = File.join(osx_place, "Libraries")
3535
return ret
3636
end

spec/arduino_cmd_spec.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
require "spec_helper"
22

33
RSpec.describe ArduinoCI::ArduinoCmd do
4-
it "Finds the Arduino executable" do
5-
arduino_cmd = ArduinoCI::ArduinoCmd.autolocate
6-
# expect(arduino_cmd.path).not_to be nil
4+
context "autolocate" do
5+
it "Finds the Arduino executable" do
6+
arduino_cmd = ArduinoCI::ArduinoCmd.autolocate
7+
end
8+
end
9+
10+
context "autolocate!" do
11+
it "Finds the Arduino executable" do
12+
arduino_cmd = ArduinoCI::ArduinoCmd.autolocate!
13+
expect(arduino_cmd.installation.cmd_path).not_to be nil
14+
end
715
end
816
end
917

0 commit comments

Comments
 (0)