spec/lib/percy/capybara/loaders/filesystem_loader_spec.rb in percy-capybara-2.5.1 vs spec/lib/percy/capybara/loaders/filesystem_loader_spec.rb in percy-capybara-2.6.0

- old
+ new

@@ -1,8 +1,8 @@ RSpec.describe Percy::Capybara::Loaders::FilesystemLoader do let(:fake_page) { OpenStruct.new(current_url: 'http://localhost/foo') } - let(:assets_dir) { File.expand_path('../../client/testdata', __FILE__) } + let(:assets_dir) { File.expand_path('../../client/test_data', __FILE__) } let(:base_url) { '/url-prefix/' } let(:loader) { described_class.new(base_url: base_url, assets_dir: assets_dir, page: fake_page) } describe 'initialize' do context 'assets_dir not specified' do @@ -11,18 +11,18 @@ it 'raises an error' do expect { loader }.to raise_error(ArgumentError) end end context 'assets_dir is not an absolute path' do - let(:assets_dir) { '../../client/testdata' } + let(:assets_dir) { '../../client/test_data' } it 'raises an error' do expect { loader }.to raise_error(ArgumentError) end end - context 'assets_dir doesn\'t exist' do - let(:assets_dir) { File.expand_path('../../client/testdata-doesnt-exist', __FILE__) } + context "assets_dir doesn't exist" do + let(:assets_dir) { File.expand_path('../../client/test-data-doesnt-exist', __FILE__) } it 'raises an error' do expect { loader }.to raise_error(ArgumentError) end end @@ -130,10 +130,10 @@ expected_urls = loader.build_resources.collect(&:resource_url) expect(expected_urls).to include('/css/font.css') end end context 'assets_dir with only skippable resources' do - let(:assets_dir) { File.expand_path('../../client/testdata/assets/images', __FILE__) } + let(:assets_dir) { File.expand_path('../../client/test_data/assets/images', __FILE__) } it 'returns an empty list' do expect(loader.build_resources).to eq([]) end end