diff --git a/spec/controllers/conferences_controller_spec.rb b/spec/controllers/conferences_controller_spec.rb index 1991d121..df536f20 100644 --- a/spec/controllers/conferences_controller_spec.rb +++ b/spec/controllers/conferences_controller_spec.rb @@ -35,7 +35,7 @@ describe Admin::ConferenceController do it 'redirects to the updated conference' do patch :update, id: conference.short_title, conference: attributes_for(:conference, title: 'Example Con') - conference.reload + conference.reload expect(response).to redirect_to admin_conference_path( conference.short_title) end diff --git a/spec/factories/conferences.rb b/spec/factories/conferences.rb index 3f783eb6..8fdbe34d 100644 --- a/spec/factories/conferences.rb +++ b/spec/factories/conferences.rb @@ -3,7 +3,7 @@ FactoryGirl.define do factory :conference do title 'The dog and pony show' - sequence(:short_title) { |n| "dps#{n}14"} + sequence(:short_title) { |n| "dps#{n}14" } social_tag 'dps14' timezone 'Amsterdam' contact_email 'admin@example.com' diff --git a/spec/factories/difficulty_levels.rb b/spec/factories/difficulty_levels.rb index e0b634ba..6cb5f877 100644 --- a/spec/factories/difficulty_levels.rb +++ b/spec/factories/difficulty_levels.rb @@ -5,4 +5,5 @@ FactoryGirl.define do color '#ffffff' conference end + end \ No newline at end of file diff --git a/spec/factories/rooms.rb b/spec/factories/rooms.rb index 8eb3c3d0..8da123d1 100644 --- a/spec/factories/rooms.rb +++ b/spec/factories/rooms.rb @@ -4,4 +4,5 @@ FactoryGirl.define do size 4 conference end + end \ No newline at end of file diff --git a/spec/factories/social_events.rb b/spec/factories/social_events.rb index 59e2380d..e0b5abd4 100644 --- a/spec/factories/social_events.rb +++ b/spec/factories/social_events.rb @@ -5,4 +5,5 @@ FactoryGirl.define do date Date.today conference end + end \ No newline at end of file diff --git a/spec/factories/supporter_levels.rb b/spec/factories/supporter_levels.rb index 42117e00..9edc89de 100644 --- a/spec/factories/supporter_levels.rb +++ b/spec/factories/supporter_levels.rb @@ -4,4 +4,5 @@ FactoryGirl.define do url 'www.example.com' conference end + end \ No newline at end of file diff --git a/spec/factories/tracks.rb b/spec/factories/tracks.rb index d0a96316..bf2adda7 100644 --- a/spec/factories/tracks.rb +++ b/spec/factories/tracks.rb @@ -5,4 +5,5 @@ FactoryGirl.define do color '#ffffff' conference end + end \ No newline at end of file diff --git a/spec/factories/vdays.rb b/spec/factories/vdays.rb index 4ebeb05a..8b7462fc 100644 --- a/spec/factories/vdays.rb +++ b/spec/factories/vdays.rb @@ -4,4 +4,5 @@ FactoryGirl.define do description 'Lorem Ipsum dolsum' conference end + end \ No newline at end of file diff --git a/spec/factories/vpositions.rb b/spec/factories/vpositions.rb index acc6ab18..f04b776f 100644 --- a/spec/factories/vpositions.rb +++ b/spec/factories/vpositions.rb @@ -8,4 +8,5 @@ FactoryGirl.define do vposition.vdays << build(:vday, conference: vposition.conference) end end + end \ No newline at end of file diff --git a/spec/support/sidebar.rb b/spec/support/sidebar.rb index d6aebd2b..54710ca1 100644 --- a/spec/support/sidebar.rb +++ b/spec/support/sidebar.rb @@ -2,7 +2,6 @@ module Sidebar def sidebar @conference = create(:conference) assign :conference, @conference - assign :cfp, CallForPapers.new render expect(view).to render_template('admin/conference/_sidebar') end diff --git a/spec/views/admin/callforpapers/show.html.haml_spec.rb b/spec/views/admin/callforpapers/show.html.haml_spec.rb index 10a1e0c8..e2fad108 100644 --- a/spec/views/admin/callforpapers/show.html.haml_spec.rb +++ b/spec/views/admin/callforpapers/show.html.haml_spec.rb @@ -1,18 +1,20 @@ require 'spec_helper' - -describe "admin/callforpapers/show" do +describe 'admin/callforpapers/show' do it 'renders conference sidebar' do + assign :cfp, CallForPapers.new expect(sidebar).to be true end it 'renders callforpapers details' do @conference = create(:conference) assign :conference, @conference assign :cfp, stub_model(CallForPapers, start_date: Date.today, - end_date: Date.today + 7.days, - hard_deadline: Date.today + 6.days, description: "Lorem Ipsum Dolsum") + end_date: Date.today + 7.days, + hard_deadline: Date.today + 6.days, + description: 'Lorem Ipsum Dolsum') render expect(rendered).to include("#{Date.today}") expect(rendered).to include("#{Date.today + 7.days}") expect(rendered).to include('Lorem Ipsum Dolsum') end + end diff --git a/spec/views/admin/conference/index.html.haml_spec.rb b/spec/views/admin/conference/index.html.haml_spec.rb index 9896a79c..0d237a7c 100644 --- a/spec/views/admin/conference/index.html.haml_spec.rb +++ b/spec/views/admin/conference/index.html.haml_spec.rb @@ -1,9 +1,8 @@ require 'spec_helper' -describe "admin/conference/index" do +describe 'admin/conference/index' do it 'renders all conference names with links' do - assign(:conferences, [create(:conference, title: 'OpenSUSE'), - create(:conference)]) + assign(:conferences, [create(:conference, title: 'OpenSUSE'), create(:conference)]) render expect(rendered).to include('OpenSUSE') expect(rendered).to include("The dog and pony show") diff --git a/spec/views/admin/conference/new.html.haml_spec.rb b/spec/views/admin/conference/new.html.haml_spec.rb index cc4df631..ebcd8a78 100644 --- a/spec/views/admin/conference/new.html.haml_spec.rb +++ b/spec/views/admin/conference/new.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/conference/new" do +describe 'admin/conference/new' do it 'renders the new template for the conference' do assign(:conference, Conference.new) render diff --git a/spec/views/admin/conference/show.html.haml_spec.rb b/spec/views/admin/conference/show.html.haml_spec.rb index 6154300f..3c2c5d35 100644 --- a/spec/views/admin/conference/show.html.haml_spec.rb +++ b/spec/views/admin/conference/show.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/conference/show" do +describe 'admin/conference/show' do it 'renders conference sidebar' do expect(sidebar).to be true end diff --git a/spec/views/admin/difficulty_levels/index.html.haml_spec.rb b/spec/views/admin/difficulty_levels/index.html.haml_spec.rb index 97e76b16..77388ba7 100644 --- a/spec/views/admin/difficulty_levels/index.html.haml_spec.rb +++ b/spec/views/admin/difficulty_levels/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/difficulty_levels/index" do +describe 'admin/difficulty_levels/index' do it 'renders conference sidebar' do expect(sidebar).to be true end diff --git a/spec/views/admin/emails/index.html.haml_spec.rb b/spec/views/admin/emails/index.html.haml_spec.rb index 6ac56f34..c50898d7 100644 --- a/spec/views/admin/emails/index.html.haml_spec.rb +++ b/spec/views/admin/emails/index.html.haml_spec.rb @@ -1,23 +1,22 @@ require 'spec_helper' - -describe "admin/emails/index" do +describe 'admin/emails/index' do it 'renders conference sidebar' do assign :settings, create(:email_settings) expect(sidebar).to be true end - it 'renders email templates' do @conference = create(:conference) assign :conference, @conference @settings = create(:email_settings) assign :settings, @settings render - expect(rendered).to have_selector("input[type='checkbox'][value='1']", - :count=>4) - expect(rendered).to have_selector( - "input[checked='checked'][type='checkbox'][value='1']", :count=> 1) + expect(rendered). + to have_selector("input[type='checkbox'][value='1']", count: 4) + expect(rendered). + to have_selector("input[checked='checked'][type='checkbox'][value='1']", count: 1) expect(rendered).to include('Lorem Ipsum Dolsum') - expect(rendered).to include( - 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit') + expect(rendered). + to include('Lorem ipsum dolor sit amet, consectetuer adipiscing elit') end + end diff --git a/spec/views/admin/eventtypes/index.html.haml_spec.rb b/spec/views/admin/eventtypes/index.html.haml_spec.rb index 78a59051..c3cdc661 100644 --- a/spec/views/admin/eventtypes/index.html.haml_spec.rb +++ b/spec/views/admin/eventtypes/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/eventtypes/index" do +describe 'admin/eventtypes/index' do it 'renders conference sidebar' do expect(sidebar).to be true end diff --git a/spec/views/admin/rooms/index.html.haml_spec.rb b/spec/views/admin/rooms/index.html.haml_spec.rb index 774f67e0..6dfffa15 100644 --- a/spec/views/admin/rooms/index.html.haml_spec.rb +++ b/spec/views/admin/rooms/index.html.haml_spec.rb @@ -1,6 +1,5 @@ require 'spec_helper' - -describe "admin/rooms/index" do +describe 'admin/rooms/index' do it 'renders conference sidebar' do expect(sidebar).to be true end @@ -11,4 +10,5 @@ describe "admin/rooms/index" do expect(rendered).to include('Example Room') expect(rendered).to include('4') end + end \ No newline at end of file diff --git a/spec/views/admin/social_events/index.html.haml_spec.rb b/spec/views/admin/social_events/index.html.haml_spec.rb index 9fd9ce47..88f5bd8f 100644 --- a/spec/views/admin/social_events/index.html.haml_spec.rb +++ b/spec/views/admin/social_events/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/social_events/index" do +describe 'admin/social_events/index' do it 'renders conference sidebar' do expect(sidebar).to be true end diff --git a/spec/views/admin/supporter_levels/index.html.haml_spec.rb b/spec/views/admin/supporter_levels/index.html.haml_spec.rb index d8b2c6d2..89453a9a 100644 --- a/spec/views/admin/supporter_levels/index.html.haml_spec.rb +++ b/spec/views/admin/supporter_levels/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/supporter_levels/index" do +describe 'admin/supporter_levels/index' do it 'renders conference sidebar' do expect(sidebar).to be true end diff --git a/spec/views/admin/tracks/index.html.haml_spec.rb b/spec/views/admin/tracks/index.html.haml_spec.rb index 6f0a9187..4083b938 100644 --- a/spec/views/admin/tracks/index.html.haml_spec.rb +++ b/spec/views/admin/tracks/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/tracks/index" do +describe 'admin/tracks/index' do it 'renders conference sidebar' do expect(sidebar).to be true end diff --git a/spec/views/admin/venue/venue_info.html.haml_spec.rb b/spec/views/admin/venue/venue_info.html.haml_spec.rb index 596c782d..6d42699e 100644 --- a/spec/views/admin/venue/venue_info.html.haml_spec.rb +++ b/spec/views/admin/venue/venue_info.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/venue/venue_info" do +describe 'admin/venue/venue_info' do it 'renders conference sidebar' do assign :venue, stub_model(Venue) expect(sidebar).to be true diff --git a/spec/views/admin/volunteers/index.html.haml_spec.rb b/spec/views/admin/volunteers/index.html.haml_spec.rb index 8ee83017..bc4414cc 100644 --- a/spec/views/admin/volunteers/index.html.haml_spec.rb +++ b/spec/views/admin/volunteers/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "admin/volunteers/index" do +describe 'admin/volunteers/index' do it 'renders conference sidebar' do expect(sidebar).to be true end @@ -11,7 +11,7 @@ describe "admin/volunteers/index" do assign :conference, @vday.conference render expect(rendered).to have_selector( - "input[checked='checked'][type='checkbox'][value='1']", count: 2) + "input[checked='checked'][type='checkbox'][value='1']", count: 2) expect(rendered).to include("#{Date.today.strftime('%Y')}") expect(rendered).to include("#{Date.today.strftime('%B')}") expect(rendered).to include("#{Date.today.strftime('%d')}") @@ -21,7 +21,7 @@ describe "admin/volunteers/index" do it 'renders volunteers positions as vpositions' do @vposition = create(:vposition) @vposition.conference.update_attributes( - use_vpositions: true, use_volunteers: true, use_vdays: true) + use_vpositions: true, use_volunteers: true, use_vdays: true) assign :conference, @vposition.conference render expect(rendered).to include("#{Date.today}") diff --git a/spec/views/home/index.html.haml_spec.rb b/spec/views/home/index.html.haml_spec.rb index ac4e5362..997fff79 100644 --- a/spec/views/home/index.html.haml_spec.rb +++ b/spec/views/home/index.html.haml_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "home/index" do +describe 'home/index' do it "renders _conference partial for each conference" do assign(:current, [create(:conference), create(:conference)]) render