rdp / os

The OS gem allows for some easy telling if you’re on windows or not. OS.windows? as well as some other helper utilities
MIT License
145 stars 33 forks source link

Spec don't pass on MacOS #60

Closed pboling closed 1 year ago

pboling commented 2 years ago

Changing the focus of this issue to "Specs don't pass on MacOS".

..................F..F..............

Failures:

  1) OS has working cpu count method
     Failure/Error: assert (cpu_count & (cpu_count - 1)) == 0 # CPU count is normally a power of 2
     Test::Unit::AssertionFailedError:
       <false> is not true.
     # ./spec/os_spec.rb:124:in `block (2 levels) in <top (required)>'

  2) OS should provide a path to directory for application config
     Failure/Error: assert OS.app_config_path('appname') == '/home/xdg/Library/Application Support/appname'
     Test::Unit::AssertionFailedError:
       <false> is not true.
     # ./spec/os_spec.rb:150:in `block (2 levels) in <top (required)>'

Finished in 0.03682 seconds
36 examples, 2 failures

The previous issue related to upgrading to RSpec 3 will be in #67

rdp commented 2 years ago

You'll probably have to use an old version of rspec. PR's are always welcome :)

On Wed, May 4, 2022 at 8:26 PM Peter Boling @.***> wrote:

Problem

Errors:

An error occurred while loading ./spec/os_spec.rb. Failure/Error: config.expect_with :rspec, :stdlib # enable should OR assert

ArgumentError: :stdlib is not supported

./spec/spec_helper.rb:8:in `block in <top (required)>'

./spec/spec_helper.rb:7:in `<top (required)>'

./spec/os_spec.rb:1:in `require'

./spec/os_spec.rb:1:in `<top (required)>'

An error occurred while loading ./spec/osx_spec.rb. Failure/Error: config.expect_with :rspec, :stdlib # enable should OR assert

ArgumentError: :stdlib is not supported

./spec/spec_helper.rb:8:in `block in <top (required)>'

./spec/spec_helper.rb:7:in `<top (required)>'

./spec/osx_spec.rb:1:in `require'

./spec/osx_spec.rb:1:in `<top (required)>'

Warnings:

Deprecation Warnings:

Requiring rspec/autorun when running RSpec via the rspec command is deprecated. Called from /Users/pboling/src/my/moss/spec/spec_helper.rb:5:in `require'.

Solution

Use modern RSpec patterns

— Reply to this email directly, view it on GitHub https://github.com/rdp/os/issues/60, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADBUAUNBSDMBB2GFUA2LDVIMWURANCNFSM5VDXHQCA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

pboling commented 2 years ago

@rdp I'll have PRs for most or all of the issues I added soon! See #27

pboling commented 1 year ago

@rdp #59 fixes this issue.