Sha256: 26e27e1899653b2fe591a70297a363746c11c9e3f224548ba3f7bcbdaae5de93

Contents?: true

Size: 758 Bytes

Versions: 14

Compression:

Stored size: 758 Bytes

Contents

require 'spec_helper'

# just for the spec
class Utilable
  include Jack::Util
  def initialize(root)
    @root = root
  end
end

describe Jack::Util do
  before(:all) do
    Jack::UI.mute = true
  end
  let(:util) do
    Utilable.new(@root)
  end

  describe "util" do
    it "app_name_convention default" do
      app_name = util.app_name_convention("rails-web-prod-1")
      expect(app_name).to eq "rails"
    end

    context "custom app_name_convention" do
      before(:each) { fake_project.create_settings }
      after(:each)  { fake_project.remove_settings }
      it "app_name_convention from project settings.yml" do
        app_name = util.app_name_convention("rails-web-prod1")
        expect(app_name).to eq "rails"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
jack-eb-1.4.4 spec/lib/util_spec.rb
jack-eb-1.4.3 spec/lib/util_spec.rb
jack-eb-1.4.2 spec/lib/util_spec.rb
jack-eb-1.4.1 spec/lib/util_spec.rb
jack-eb-1.4.0 spec/lib/util_spec.rb
jack-eb-1.3.0 spec/lib/util_spec.rb
jack-eb-1.2.1 spec/lib/util_spec.rb
jack-eb-1.2.0 spec/lib/util_spec.rb
jack-eb-1.1.2 spec/lib/util_spec.rb
jack-eb-1.1.1 spec/lib/util_spec.rb
jack-eb-1.1.0 spec/lib/util_spec.rb
jack-eb-1.0.1 spec/lib/util_spec.rb
jack-eb-1.0.0 spec/lib/util_spec.rb
jack-eb-0.3.0 spec/lib/util_spec.rb