Sha256: bd5bdcbc3ac52d50de6584e69eb48afd1bbb8b098780620b10185fe95c9f7c9f

Contents?: true

Size: 1.09 KB

Versions: 64

Compression:

Stored size: 1.09 KB

Contents

Dir.chdir File.join File.dirname(__FILE__), '../../../'
require './lib/flok'
require './spec/lib/temp_dir'

#We are using the CHROME module as a test because it's fairly standardized

RSpec.describe "lib/platform" do
  it "can list drivers" do
    platforms = Flok.platforms
    expect(platforms.class).to eq(Array)
    expect(platforms.first.class).to eq(String)
    expect(platforms).to include("chrome")
  end

  it "can list specific config_yml" do
    debug_yml = Flok::Platform.config_yml("DEBUG")
    release_yml = Flok::Platform.config_yml("RELEASE")

    expect(debug_yml.keys.count).not_to eq(0)

    #Should not have same modules (at least for chrome)
    expect(release_yml["mods"].count).not_to eq(release_yml.keys.count)
  end

  it "can list modules specific to an environment" do
    config_yml = File.read("./spec/etc/lib/assets/config.yml")
    Dir.chdir new_temp_dir do
      File.write "config.yml", config_yml
      ENV['FLOK_CONFIG'] = './config.yml'

      debug_mods = Flok::Platform.mods("DEBUG")

      expect(debug_mods).to include("hello")
      ENV['FLOK_CONFIG'] = nil
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
flok-0.0.105 spec/etc/lib/platform_spec.rb
flok-0.0.103 spec/etc/lib/platform_spec.rb
flok-0.0.102 spec/etc/lib/platform_spec.rb
flok-0.0.101 spec/etc/lib/platform_spec.rb
flok-0.0.100 spec/etc/lib/platform_spec.rb
flok-0.0.99 spec/etc/lib/platform_spec.rb
flok-0.0.98 spec/etc/lib/platform_spec.rb
flok-0.0.97 spec/etc/lib/platform_spec.rb
flok-0.0.96 spec/etc/lib/platform_spec.rb
flok-0.0.95 spec/etc/lib/platform_spec.rb
flok-0.0.94 spec/etc/lib/platform_spec.rb
flok-0.0.93 spec/etc/lib/platform_spec.rb
flok-0.0.92 spec/etc/lib/platform_spec.rb
flok-0.0.91 spec/etc/lib/platform_spec.rb
flok-0.0.90 spec/etc/lib/platform_spec.rb
flok-0.0.89 spec/etc/lib/platform_spec.rb
flok-0.0.88 spec/etc/lib/platform_spec.rb
flok-0.0.87 spec/etc/lib/platform_spec.rb
flok-0.0.86 spec/etc/lib/platform_spec.rb
flok-0.0.85 spec/etc/lib/platform_spec.rb