Sha256: 61cdb6fc3d88d9a6b9c24db5c974f28f946e024e4b547e21895fa4c581ac36fe

Contents?: true

Size: 692 Bytes

Versions: 8

Compression:

Stored size: 692 Bytes

Contents

require 'iruby/jupyter'

module IRubyTest
  class JupyterDefaultKernelSpecDirectoryTest < TestBase
    def setup
      @kernel_spec = IRuby::Jupyter.kernelspec_dir
    end

    def test_default_windows
      windows_only
      appdata = IRuby::Jupyter.send :windows_user_appdata
      assert_equal(File.join(appdata, 'jupyter/kernels'), @kernel_spec)
    end

    def test_default_apple
      apple_only
      assert_equal(File.expand_path('~/Library/Jupyter/kernels'), @kernel_spec)
    end

    def test_default_unix
      unix_only
      with_env('XDG_DATA_HOME' => nil) do
        assert_equal(File.expand_path('~/.local/share/jupyter/kernels'), @kernel_spec)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
iruby-0.7.4 test/iruby/jupyter_test.rb
iruby-0.7.3 test/iruby/jupyter_test.rb
iruby-0.7.2 test/iruby/jupyter_test.rb
iruby-0.7.1 test/iruby/jupyter_test.rb
iruby-0.7.0 test/iruby/jupyter_test.rb
iruby-0.6.1 test/iruby/jupyter_test.rb
iruby-0.6.0 test/iruby/jupyter_test.rb
iruby-0.5.0 test/iruby/jupyter_test.rb