Skip to content

Instantly share code, notes, and snippets.

@smcabrera
Created October 23, 2015 17:30
Show Gist options
  • Select an option

  • Save smcabrera/d883c949f12199c2535b to your computer and use it in GitHub Desktop.

Select an option

Save smcabrera/d883c949f12199c2535b to your computer and use it in GitHub Desktop.
describe '#lead_total' do
it 'returns the sum of the totals for all the other sections:
sleeping rooms, event space, f&b, audiovisual and concessions' do
lead = build(:lead)
expect(lead).to respond_to(:event_space_total)
expect(lead).to respond_to(:sleeping_rooms_total)
expect(lead).to respond_to(:event_space_total)
expect(lead).to respond_to(:food_and_beverage_total)
expect(lead).to respond_to(:audiovisual_total)
expect(lead).to respond_to(:concession_total)
expect(lead).to receive(:sleeping_rooms_total).and_return 100
expect(lead).to receive(:event_space_total).and_return 100
expect(lead).to receive(:food_and_beverage_total).and_return 100
expect(lead).to receive(:audiovisual_total).and_return 100
expect(lead).to receive(:concession_total).and_return 100
expect(lead).to receive(:total_misc_cost).and_return 100
expect(lead.lead_total).to eq 600
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment