From a75087aa6c6ea241cbd0ed43d6bdf78c4ce728e4 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Thu, 29 Nov 2018 11:02:25 +0100 Subject: [PATCH] Prepare spec_helper for focused tests --- spec/controllers/matches_controller_spec.rb | 2 +- spec/spec_helper.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/controllers/matches_controller_spec.rb b/spec/controllers/matches_controller_spec.rb index 5b83fa8..84f4c2c 100644 --- a/spec/controllers/matches_controller_spec.rb +++ b/spec/controllers/matches_controller_spec.rb @@ -18,7 +18,7 @@ RSpec.describe MatchesController, type: :controller do it 'should return the correct state' do get :show, params: { id: @match.to_param } body = ActiveModelSerializers::Deserialization.jsonapi_parse(JSON.parse(response.body)) - expect(body[:state]).to be(@match.state) + expect(body[:state]).to eq(@match.state) expect(body[:score_ids]).to eq(@match.scores.map { |score| score.id.to_s }) end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c593825..9e55c9c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -22,6 +22,10 @@ RSpec.configure do |config| # rspec-expectations config goes here. You can use an alternate # assertion/expectation library such as wrong or the stdlib/minitest # assertions if you prefer. + + # only runs tests with " , focus: true " + # config.filter_run focus: true + config.expect_with :rspec do |expectations| # This option will default to `true` in RSpec 4. It makes the `description` # and `failure_message` of custom matchers include text for helper methods