From 2d53a4863c2034f463dbcee202165cd39e3dfc82 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Tue, 21 Apr 2015 19:35:15 +0200 Subject: [PATCH] Minor style fix in query feature spec: use #tap Signed-off-by: Alex Coles --- spec/features/work_packages/select_query_spec.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/spec/features/work_packages/select_query_spec.rb b/spec/features/work_packages/select_query_spec.rb index df7e196285..0aeb9fd3e9 100644 --- a/spec/features/work_packages/select_query_spec.rb +++ b/spec/features/work_packages/select_query_spec.rb @@ -43,12 +43,13 @@ describe 'Query selection', type: :feature do let(:i18n_filter_2_name) { WorkPackage.human_attribute_name(filter_2_name.to_sym) } let!(:query) do - query = FactoryGirl.build(:query, project: project, is_public: true) - query.filters = [ - Queries::WorkPackages::Filter.new(filter_1_name, operator: '=', values: ['me']), - Queries::WorkPackages::Filter.new(filter_2_name, operator: '>=', values: [10]) - ] - query.save and return query + FactoryGirl.build(:query, project: project, is_public: true).tap do |query| + query.filters = [ + Queries::WorkPackages::Filter.new(filter_1_name, operator: '=', values: ['me']), + Queries::WorkPackages::Filter.new(filter_2_name, operator: '>=', values: [10]) + ] + query.save + end end let(:work_packages_page) { WorkPackagesPage.new(project) }