rating/spec/config/rating_table_spec.rb

16 lines
406 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
RSpec.describe Rating::Config, '.rating_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.rating_table).to eq 'rating_ratings' }
end
end
2019-10-03 22:07:50 +00:00
if ENV['CONFIG_ENABLED'] == 'true'
context 'when rating.yml exists' do
it { expect(subject.rating_table).to eq 'review_ratings' }
end
end
end