Sha256: 984211487bd1ff69a72333175734f19c6b9ec234eba14b82e60afba04878b4e9

Contents?: true

Size: 501 Bytes

Versions: 3

Compression:

Stored size: 501 Bytes

Contents

# frozen_string_literal: true

require 'support/env_mock'

RSpec.describe RSpeed::Variable, '.append_name' do
  context 'when env name is given' do
    it 'appends the rspeed name on the given value' do
      EnvMock.mock(rspeed_name: 'name') do
        expect(described_class.append_name('value')).to eq('value_name')
      end
    end
  end

  context 'when env name is not given' do
    it 'ignores the suffix' do
      expect(described_class.append_name('value')).to eq('value')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspeed-0.5.2 spec/models/rspeed/variable/append_name_spec.rb
rspeed-0.5.1 spec/models/rspeed/variable/append_name_spec.rb
rspeed-0.5.0 spec/models/rspeed/variable/append_name_spec.rb