From 40562334c7ee558163cb2b9c110a08327fcdf866 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Mon, 2 May 2016 15:30:22 +0200 Subject: [PATCH] Make rubocop happy again --- spec/factories/question.rb | 2 +- spec/factories/sponsorship_levels.rb | 2 +- spec/serializers/track_serializer_spec.rb | 2 +- spec/support/save_feature_failures.rb | 9 +++------ 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/spec/factories/question.rb b/spec/factories/question.rb index ecbeceac..5a2a58e5 100644 --- a/spec/factories/question.rb +++ b/spec/factories/question.rb @@ -5,6 +5,6 @@ FactoryGirl.define do title { Faker::Lorem.sentence } question_type conferences { [create(:conference)] } - answers { [create(:answer) ] } + answers { [create(:answer)] } end end diff --git a/spec/factories/sponsorship_levels.rb b/spec/factories/sponsorship_levels.rb index a6702f6e..df2e3b6d 100644 --- a/spec/factories/sponsorship_levels.rb +++ b/spec/factories/sponsorship_levels.rb @@ -3,7 +3,7 @@ FactoryGirl.define do factory :sponsorship_level do title { Faker::Hipster.word } - + conference end end diff --git a/spec/serializers/track_serializer_spec.rb b/spec/serializers/track_serializer_spec.rb index e6c55d6c..00522eae 100644 --- a/spec/serializers/track_serializer_spec.rb +++ b/spec/serializers/track_serializer_spec.rb @@ -8,7 +8,7 @@ describe TrackSerializer, type: :serializer do expected_json = { track: { guid: track.guid, - name: track.name, + name: track.name, color: track.color } }.to_json diff --git a/spec/support/save_feature_failures.rb b/spec/support/save_feature_failures.rb index 3109c993..fe6edf66 100644 --- a/spec/support/save_feature_failures.rb +++ b/spec/support/save_feature_failures.rb @@ -9,12 +9,9 @@ RSpec.configure do |config| example_filename = File.expand_path(example_filename, Capybara.save_and_open_page_path) if RSpec.current_example.exception.present? save_page(example_filename) - else - # remove the file if the test starts working again - if File.exist?(example_filename) - File.unlink(example_filename) - end + # remove the file if the test starts working again + elsif File.exist?(example_filename) + File.unlink(example_filename) end end end -