Sha256: c201081eb853c05a200a0cbe57468174ae4246ec10354cd43484a09189066e0a

Contents?: true

Size: 1.32 KB

Versions: 1

Compression:

Stored size: 1.32 KB

Contents

shared_examples 'when a home path is define' do
  shared_examples 'expects the custom fixture on the page' do
    it 'applies a stored fixture in the directory defined in the home path' do
      expect(cat_owner).to have_content('Bran Stark')
    end
  end

  context 'when no custom fixture is applied' do
    before do
      actor_with_home_path.public_send(action_method)
    end

    it 'applies a stored fixture in the directory defined in the home path' do
      expect(cat_owner).to have_content('Daenerys Targaryen')
    end
  end

  context 'when a custom fixture is applied' do
    before do
      actor_with_home_path.public_send(action_method) do
        fixtures ['~/bran_stark']
      end
    end

    it_behaves_like 'expects the custom fixture on the page'
  end

  context 'when a home path is used within the path helper method' do
    before do
      actor_with_home_path.public_send(action_method) do
        path '~/', ['bran_stark']
      end
    end

    it_behaves_like 'expects the custom fixture on the page'
  end

  context 'when a home path is directly defined in the block for applying fixtures' do
    before do
      actor_without_home_path.public_send(action_method) do
        home_path 'custom'

        fixtures ['~/bran_stark']
      end
    end

    it_behaves_like 'expects the custom fixture on the page'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
site_prism.vcr-0.1.0 spec/support/shared/integration/home_path.rb