Sha256: d303a2900a7f56a9a7e1cb18992cdd43b706afabbc1e407c906889bfedafc0c9
Contents?: true
Size: 485 Bytes
Versions: 4
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true describe LokaliseRails::Utils do describe '.rails_root' do it 'returns RAILS_ROOT if defined' do allow(::Rails).to receive(:root).and_return(nil) stub_const('RAILS_ROOT', '/stub') expect(described_class.rails_root).to eq('/stub') end it 'fallbacks if neither roots are present' do allow(::Rails).to receive(:root).and_return(nil) expect(described_class.rails_root).to be_nil end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lokalise_rails-5.0.1 | spec/lib/utils_spec.rb |
lokalise_rails-5.0.0 | spec/lib/utils_spec.rb |
lokalise_rails-4.0.0 | spec/lib/utils_spec.rb |
lokalise_rails-3.0.0 | spec/lib/utils_spec.rb |