jyruzicka / rubyfocus

A one-way (read-only) ruby bridge to OmniFocus.
28 stars 10 forks source link

Specs are failling #6

Closed johntrandall closed 4 years ago

johntrandall commented 4 years ago

https://github.com/jyruzicka/rubyfocus/commit/80f944de2676d4b96b09ac745f0868e6f292f4cf seems to have made a bunch of specs fail. I've forked it from just prior to that commit (0f162a0) when everything was still green.

Any advice on how to get a green master again?

$ rspec
......................FF.FF.......................................................................................................

Failures:

  1) Rubyfocus::LocalFetcher#default_location with one default location should pick the default location
     Failure/Error:
       expect(lf.default_location).to eq(
         File.join(
           __dir__,
           "../files/test_library/with_one_default_location/com.omnigroup.OmniFocus3/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
         )
       )

       expected: "/Users/johnrandall/code/forks/rubyfocus/spec/fetchers/../files/test_library/with_one_default_location/com.omnigroup.OmniFocus3/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
            got: ""

       (compared using ==)
     # ./spec/fetchers/local_fetcher_spec.rb:76:in `block (4 levels) in <top (required)>'

  2) Rubyfocus::LocalFetcher#default_location with two default locations should pick the latest location
     Failure/Error:
       expect(lf.default_location).to eq(
         File.join(
           __dir__,
           "../files/test_library/with_two_default_locations/com.omnigroup.OmniFocus3/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
         )
       )

       expected: "/Users/johnrandall/code/forks/rubyfocus/spec/fetchers/../files/test_library/with_two_default_locations/com.omnigroup.OmniFocus3/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
            got: ""

       (compared using ==)
     # ./spec/fetchers/local_fetcher_spec.rb:93:in `block (4 levels) in <top (required)>'

  3) Rubyfocus::LocalFetcher#appstore_location with one appstore location should pick the appstore location
     Failure/Error:
       expect(lf.appstore_location).to eq(
         File.join(
           __dir__,
           "../files/test_library/with_one_appstore_location/com.omnigroup.OmniFocus3.MacAppStore/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
         )
       )

       expected: "/Users/johnrandall/code/forks/rubyfocus/spec/fetchers/../files/test_library/with_one_appstore_locati...on/com.omnigroup.OmniFocus3.MacAppStore/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
            got: ""

       (compared using ==)
     # ./spec/fetchers/local_fetcher_spec.rb:124:in `block (4 levels) in <top (required)>'

  4) Rubyfocus::LocalFetcher#appstore_location with two appstore locations should pick the latest location
     Failure/Error:
       expect(lf.appstore_location).to eq(
         File.join(
           __dir__,
           "../files/test_library/with_two_appstore_locations/com.omnigroup.OmniFocus3.MacAppStore/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
         )
       )

       expected: "/Users/johnrandall/code/forks/rubyfocus/spec/fetchers/../files/test_library/with_two_appstore_locati...ns/com.omnigroup.OmniFocus3.MacAppStore/Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
            got: ""

       (compared using ==)
     # ./spec/fetchers/local_fetcher_spec.rb:141:in `block (4 levels) in <top (required)>'

Finished in 0.08788 seconds (files took 0.32314 seconds to load)
130 examples, 4 failures

Failed examples:

rspec ./spec/fetchers/local_fetcher_spec.rb:69 # Rubyfocus::LocalFetcher#default_location with one default location should pick the default location
rspec ./spec/fetchers/local_fetcher_spec.rb:86 # Rubyfocus::LocalFetcher#default_location with two default locations should pick the latest location
rspec ./spec/fetchers/local_fetcher_spec.rb:117 # Rubyfocus::LocalFetcher#appstore_location with one appstore location should pick the appstore location
rspec ./spec/fetchers/local_fetcher_spec.rb:134 # Rubyfocus::LocalFetcher#appstore_location with two appstore locations should pick the latest location
jyruzicka commented 4 years ago

Ugh, I thought this felt weird.

I have a few folders set up on my machine for testing, but they're empty folders (designed to mimic the format of the OS X library directory). Git won't commit empty folders, so it refuses to recreate them when you clone the repo.

Just added some meaningless blank files to each folder, forcing git to include them. Newest commit (v0.6.0) should work for you - but just in case it doesn't, I'm leaving this ticket open. Have a check and see if that fixes your problem - and if so, feel free to close the ticket!

(I guess I should figure out how to include CI on my projects one day...as you can guess from the project's commit history, I'm no longer using this gem, and it's not really under active maintenance any more.)

johntrandall commented 4 years ago

excellent! That did it. Thanks!