Sha256: cd3bf9013d402b73d4b232d3b6c89cadfe6aba82ec9a1b3a29f7c56f7bbb7e2b

Contents?: true

Size: 516 Bytes

Versions: 5

Compression:

Stored size: 516 Bytes

Contents

require "wombat/common"
require "yaml"

describe "Common" do
  let(:common) do
    klass = Class.new { include Wombat::Common }

    return klass.new
  end

  describe "#wombat" do
    it "reads a configuration file" do
      wombat_yml = File.join(
        File.expand_path("../..", File.dirname(__FILE__)),
        "generator_files",
        "wombat.yml"
      )

      stub_const("ENV", {"WOMBAT_YML" => wombat_yml})

      content = common.wombat

      expect(content["name"]).to eq("wombat")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wombat-cli-0.7.3 spec/functional/common_spec.rb
wombat-cli-0.7.2 spec/functional/common_spec.rb
wombat-cli-0.6.2 spec/functional/common_spec.rb
wombat-cli-0.4.1 spec/functional/common_spec.rb
wombat-cli-0.4.0 spec/functional/common_spec.rb