Sha256: 43374861e4b52b236524614d9fddd355d55a2d9f7d2625156547e531d909bedc

Contents?: true

Size: 739 Bytes

Versions: 9

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'
require 'natives/apps/detect'

describe Natives::Apps::Detect do
  it "detects host's platform and package provider info" do
    app = Natives::Apps::Detect.new

    host_detection = double()
    host_detection.stub(platform: 'ubuntu')
    host_detection.stub(platform_version: '12.3.2')
    host_detection.stub(package_provider: 'apt')
    app.should_receive(:new_host_detection).
      and_return(host_detection)

    expect(app.detection_info).to eq([
      'platform: ubuntu',
      'platform_version: 12.3.2',
      'package_provider: apt'
    ].join("\n"))
  end

  it "uses HostDetection" do
    app = Natives::Apps::Detect.new
    expect(app.new_host_detection).to be_kind_of Natives::HostDetection
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
natives-0.6.2 spec/natives/apps/detect_spec.rb
natives-0.6.1 spec/natives/apps/detect_spec.rb
natives-0.6.0 spec/natives/apps/detect_spec.rb
natives-0.5.5 spec/natives/apps/detect_spec.rb
natives-0.5.4 spec/natives/apps/detect_spec.rb
natives-0.5.3 spec/natives/apps/detect_spec.rb
natives-0.5.2 spec/natives/apps/detect_spec.rb
natives-0.5.1 spec/natives/apps/detect_spec.rb
natives-0.5.0 spec/natives/apps/detect_spec.rb