diff --git a/spec/views/conference/show.html.haml_spec.rb b/spec/views/conference/show.html.haml_spec.rb
index 7af548ce..c1d5b43a 100644
--- a/spec/views/conference/show.html.haml_spec.rb
+++ b/spec/views/conference/show.html.haml_spec.rb
@@ -1,21 +1,20 @@
require 'spec_helper'
describe 'conference/show.html.haml' do
- it 'renders program partial' do
- @conference = create(:conference, description: 'Lorem Ipsum')
+ before(:each) do
+ @conference = create(:conference, registration_description: 'Lorem Ipsum Dolor',
+ registration_start_date: Date.today,
+ registration_end_date: Date.tomorrow,
+ description: 'Lorem Ipsum')
assign :conference, @conference
render
+ end
+ it 'renders program partial' do
expect(render).to include("#{@conference.description}")
expect(view).to render_template(partial: 'conference/_program')
end
it 'renders registration partial' do
- @conference = create(:conference, registration_description: 'Lorem Ipsum Dolor',
- registration_start_date: Date.today,
- registration_end_date: Date.tomorrow)
- assign :conference, @conference
- render
expect(rendered).to include("#{@conference.registration_description}")
- expect(rendered).to include("Register for #{@conference.short_title}")
expect(view).to render_template(partial: 'conference/_registration')
end
end