From 6836a15a4823bb80c7377e4fec5d3fca31765f93 Mon Sep 17 00:00:00 2001 From: Greg Hurrell Date: Sun, 17 Jan 2016 10:11:33 -0800 Subject: [PATCH] Avoid using deprecated/removed `be_` matchers To play nicely with RSpec 3 (even though I am using RSpec 2.14.7 locally), which has removed the `be_true` and `be_false` matchers in favor of `be_truthy`/`be_falsey`, which is what the old matchers actually meant. Reported here: https://github.com/wincent/command-t/issues/190 Using the alternative (`be true`, `be false` etc) recommended here: https://github.com/rspec/rspec-rails/issues/976#issuecomment-38967708 Because my intention actually always was to assert strictly against `true`/`false`. --- spec/command-t/watchman/utils_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/command-t/watchman/utils_spec.rb b/spec/command-t/watchman/utils_spec.rb index b9705416..4a6f6056 100644 --- a/spec/command-t/watchman/utils_spec.rb +++ b/spec/command-t/watchman/utils_spec.rb @@ -71,15 +71,15 @@ def roundtrip(value) end it 'roundtrips `true` booleans' do - expect(roundtrip(true)).to be_true + expect(roundtrip(true)).to be true end it 'roundtrips `false` booleans' do - expect(roundtrip(false)).to be_false + expect(roundtrip(false)).to be false end it 'roundtrips nil' do - expect(roundtrip(nil)).to be_nil + expect(roundtrip(nil)).to be nil end describe '.load' do @@ -278,17 +278,17 @@ def roundtrip(value) it 'loads boolean `true` values' do input = binary("\x00\x01\x03\x01\x08") - expect(described_class.load(input)).to be_true + expect(described_class.load(input)).to be true end it 'loads boolean `false` values' do input = binary("\x00\x01\x03\x01\x09") - expect(described_class.load(input)).to be_false + expect(described_class.load(input)).to be false end it 'loads nil' do input = binary("\x00\x01\x03\x01\x0a") - expect(described_class.load(input)).to be_nil + expect(described_class.load(input)).to be nil end it 'loads templates' do