Sha256: ff85f48d74f6a80d4ad1018a62f0ec180faaf1b11253a3442e4a1623331ecdfc

Contents?: true

Size: 833 Bytes

Versions: 24

Compression:

Stored size: 833 Bytes

Contents

require 'spec_helper'

describe Launchy::Detect::NixDesktopEnvironment do

  before do
    Launchy.reset_global_options
  end

  after do
    Launchy.reset_global_options
  end

  it "returns false for XFCE if xprop is not found" do
    Launchy.host_os = "linux"
    _(Launchy::Detect::NixDesktopEnvironment::Xfce.is_current_desktop_environment?).must_equal( false )
  end

  it "returns NotFound if it cannot determine the *nix desktop environment" do
    Launchy.host_os = "linux"
    ENV.delete( "KDE_FULL_SESSION" )
    ENV.delete( "GNOME_DESKTOP_SESSION_ID" )
    Launchy.path = %w[ / /tmp ].join(File::PATH_SEPARATOR)
    not_found = Launchy::Detect::NixDesktopEnvironment.detect
    _(not_found).must_equal( Launchy::Detect::NixDesktopEnvironment::NotFound )
    _(not_found.browser).must_equal( Launchy::Argv.new )
  end
end

Version data entries

24 entries across 15 versions & 2 rubygems

Version Path
launchy-3.0.0 spec/detect/nix_desktop_environment_spec.rb
launchy-2.5.2 spec/detect/nix_desktop_environment_spec.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/launchy-2.5.0/spec/detect/nix_desktop_environment_spec.rb