spec/support/shared_examples.rb in LittleWeasel-5.0.5 vs spec/support/shared_examples.rb in LittleWeasel-5.0.6
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
RSpec.shared_examples 'the dictionary_key is invalid' do
context 'when the dictionary_key is nil' do
let(:dictionary_key) {}
it 'raises an error' do
@@ -54,52 +56,52 @@
# Word filter shared examples
RSpec.shared_examples 'the filter matches and #filter_on? is true' do
it 'returns true' do
- expect(subject.filter_match? word).to eq true
+ expect(subject.filter_match?(word)).to be true
end
end
RSpec.shared_examples 'the filter DOES NOT match and #filter_on? is true' do
it 'returns false' do
- expect(subject.filter_match? word).to eq false
+ expect(subject.filter_match?(word)).to be false
end
end
RSpec.shared_examples 'the filter matches and #filter_on? is false' do
it 'returns false' do
- expect(subject.filter_match? word).to eq false
+ expect(subject.filter_match?(word)).to be false
end
end
RSpec.shared_examples 'the filter DOES NOT match and #filter_on? is false' do
it 'returns false' do
- expect(subject.filter_match? word).to eq false
+ expect(subject.filter_match?(word)).to be false
end
end
# Preprocessor shared examples
RSpec.shared_examples 'the preprocessor matches and #preprocessor_on? is true' do
it 'returns true' do
- expect(subject.preprocess? word).to eq true
+ expect(subject.preprocess?(word)).to be true
end
end
RSpec.shared_examples 'the preprocessor DOES NOT match and #preprocessor_on? is true' do
it 'returns false' do
- expect(subject.preprocess? word).to eq false
+ expect(subject.preprocess?(word)).to be false
end
end
RSpec.shared_examples 'the preprocessor matches and #preprocessor_on? is false' do
it 'returns false' do
- expect(subject.preprocess? word).to eq false
+ expect(subject.preprocess?(word)).to be false
end
end
RSpec.shared_examples 'the preprocessor DOES NOT match and #preprocessor_on? is false' do
it 'returns false' do
- expect(subject.preprocess? word).to eq false
+ expect(subject.preprocess?(word)).to be false
end
end