Sha256: 403229ff1d79de3a6ecf6f6a51a82a2f84525aa57b9c8e87a12e66febe8ac16c

Contents?: true

Size: 542 Bytes

Versions: 5

Compression:

Stored size: 542 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.6.1 spec/functional/common_spec.rb
wombat-cli-0.6.0 spec/functional/common_spec.rb
wombat-cli-0.5.0 spec/functional/common_spec.rb
wombat-cli-0.4.3 spec/functional/common_spec.rb
wombat-cli-0.4.2 spec/functional/common_spec.rb