Skip to content

Instantly share code, notes, and snippets.

@dubilla
Created November 1, 2013 16:40
Show Gist options
  • Save dubilla/7268137 to your computer and use it in GitHub Desktop.
Save dubilla/7268137 to your computer and use it in GitHub Desktop.
describe 'custom flyers' do
use_vcr_cassette :record => :new_episodes
let(:property){ create :property, custom_flyer: File.open(Rails.root.join "spec/fixtures/space_flyers/horizontal_flyer.pdf") }
let(:space){ create :space, custom_flyer: File.open(Rails.root.join "spec/fixtures/space_flyers/vertical_flyer.pdf"), property: property }
before do
binding.pry
visit property_path(property)
end
describe 'for a building' do
context 'that has a custom flyer' do
specify 'the building flyer is linked up' do
page.should have_selector '.property-custom-flyer'
end
end
end
describe 'for a space' do
context 'that has a custom flyer' do
specify 'the space flyer is linked up' do
page.should have_selector '.space-custom-flyer'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment