2018-02-14 16:43:13 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
RSpec.describe Rating::Config, '.rate_table' do
|
2019-10-03 22:07:50 +00:00
|
|
|
if ENV['CONFIG_ENABLED'] != 'true'
|
|
|
|
context 'when rating.yml does not exist' do
|
|
|
|
it { expect(subject.rate_table).to eq 'rating_rates' }
|
|
|
|
end
|
|
|
|
end
|
2018-02-14 16:43:13 +00:00
|
|
|
|
2019-10-03 22:07:50 +00:00
|
|
|
if ENV['CONFIG_ENABLED'] == 'true'
|
|
|
|
context 'when rating.yml exists' do
|
|
|
|
it { expect(subject.rate_table).to eq 'reviews' }
|
|
|
|
end
|
|
|
|
end
|
2018-02-14 16:43:13 +00:00
|
|
|
end
|