Skip to content

Commit

Permalink
Avoid using deprecated/removed be_ matchers
Browse files Browse the repository at this point in the history
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: #190

Using the alternative (`be true`, `be false` etc) recommended here:

rspec/rspec-rails#976 (comment)

Because my intention actually always was to assert strictly against
`true`/`false`.
  • Loading branch information
wincent committed Jan 17, 2016
1 parent 8995041 commit 6836a15
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/command-t/watchman/utils_spec.rb
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6836a15

Please sign in to comment.