diff --git a/spec/mongoid/enum/validators/multiple_validator_spec.rb b/spec/mongoid/enum/validators/multiple_validator_spec.rb index 7791dc3..d47c605 100644 --- a/spec/mongoid/enum/validators/multiple_validator_spec.rb +++ b/spec/mongoid/enum/validators/multiple_validator_spec.rb @@ -16,14 +16,14 @@ describe Mongoid::Enum::Validators::MultipleValidator do context "and value is nil" do before(:each) { validator.validate_each(record, attribute, nil) } it "validates" do - expect(record.errors[attribute].empty?).to be_true + expect(record.errors[attribute].empty?).to be true end end context "and value is []" do before(:each) { validator.validate_each(record, attribute, []) } it "validates" do - expect(record.errors[attribute].empty?).to be_true + expect(record.errors[attribute].empty?).to be true end end end @@ -32,14 +32,14 @@ describe Mongoid::Enum::Validators::MultipleValidator do context "and value is nil" do before(:each) { validator.validate_each(record, attribute, nil) } it "won't validate" do - expect(record.errors[attribute].any?).to be_true + expect(record.errors[attribute].any?).to be true expect(record.errors[attribute]).to eq ["is not in #{values.join ", "}"] end end context "and value is []" do before(:each) { validator.validate_each(record, attribute, []) } it "won't validate" do - expect(record.errors[attribute].any?).to be_true + expect(record.errors[attribute].any?).to be true expect(record.errors[attribute]).to eq ["is not in #{values.join ", "}"] end end @@ -49,7 +49,7 @@ describe Mongoid::Enum::Validators::MultipleValidator do let(:allow_nil) { rand(2).zero? } before(:each) { validator.validate_each(record, attribute, [values.sample]) } it "validates" do - expect(record.errors[attribute].empty?).to be_true + expect(record.errors[attribute].empty?).to be true end end @@ -57,7 +57,7 @@ describe Mongoid::Enum::Validators::MultipleValidator do let(:allow_nil) { rand(2).zero? } before(:each) { validator.validate_each(record, attribute, [:amet]) } it "won't validate" do - expect(record.errors[attribute].any?).to be_true + expect(record.errors[attribute].any?).to be true end end @@ -65,7 +65,7 @@ describe Mongoid::Enum::Validators::MultipleValidator do let(:allow_nil) { rand(2).zero? } before(:each) { validator.validate_each(record, attribute, [values.first, values.last]) } it "validates" do - expect(record.errors[attribute].empty?).to be_true + expect(record.errors[attribute].empty?).to be true end end @@ -73,7 +73,7 @@ describe Mongoid::Enum::Validators::MultipleValidator do let(:allow_nil) { rand(2).zero? } before(:each) { validator.validate_each(record, attribute, [values.first, values.last, :amet]) } it "won't validate" do - expect(record.errors[attribute].any?).to be_true + expect(record.errors[attribute].any?).to be true end end end diff --git a/spec/mongoid/enum_spec.rb b/spec/mongoid/enum_spec.rb index 84e752d..6d49ceb 100644 --- a/spec/mongoid/enum_spec.rb +++ b/spec/mongoid/enum_spec.rb @@ -56,7 +56,7 @@ describe Mongoid::Enum do end end - describe "accessors"do + describe "accessors" do context "when singular" do describe "{{value}}!" do it "sets the value" do @@ -111,15 +111,15 @@ describe Mongoid::Enum do instance.save instance.author! instance.editor! - expect(instance.editor?).to be_true - expect(instance.author?).to be_true + expect(instance.editor?).to be true + expect(instance.author?).to be true end end context "when {{enum}} does not contain {{value}}" do it "returns false" do instance.save - expect(instance.author?).to be_false + expect(instance.author?).to be false end end end