spec/validator_result_spec.rb in focuslight-0.1.3 vs spec/validator_result_spec.rb in focuslight-0.1.4
- old
+ new
@@ -3,15 +3,15 @@
require 'focuslight/validator'
describe Focuslight::Validator::Result do
it 'indicate that it has errors or not' do
r = Focuslight::Validator::Result.new
- expect(r.has_error?).to be_false
+ expect(r.has_error?).to be_falsey
r.error(:key, "error 1")
- expect(r.has_error?).to be_true
+ expect(r.has_error?).to be_truthy
expect(r.errors).to eql({key: "key: error 1"})
r.error(:key2, "error 2")
- expect(r.has_error?).to be_true
+ expect(r.has_error?).to be_truthy
expect(r.errors).to eql({key:"key: error 1", key2:"key2: error 2"})
end
it 'can contain values like Hash, but keys are symbolized' do
r = Focuslight::Validator::Result.new