spec/model_spec.rb in cistern-0.9.0 vs spec/model_spec.rb in cistern-0.9.1
- old
+ new
@@ -11,11 +11,11 @@
model = DupSpec.new(id: 1, name: "string", properties: {value: "something", else: "what"})
duplicate = model.dup
expect(duplicate).to eq(model)
- expect(duplicate).not_to eql model
+ expect(duplicate).to eql(model)
model.name= "anotherstring"
expect(duplicate.name).to eq("string")
end
@@ -57,17 +57,17 @@
expect(created_at).to be_a(Time)
expect(created_at.to_i).to eq(time.to_i)
end
it "should parse boolean" do
- expect(TypeSpec.new(flag: "false").flag).to be_false
- expect(TypeSpec.new(flag: "true").flag).to be_true
- expect(TypeSpec.new(flag: false).flag).to be_false
- expect(TypeSpec.new(flag: true).flag).to be_true
- expect(TypeSpec.new(flag: "0").flag).to be_false
- expect(TypeSpec.new(flag: "1").flag).to be_true
- expect(TypeSpec.new(flag: 0).flag).to be_false
- expect(TypeSpec.new(flag: 1).flag).to be_true
+ expect(TypeSpec.new(flag: "false").flag).to be_falsey
+ expect(TypeSpec.new(flag: "true").flag).to be_truthy
+ expect(TypeSpec.new(flag: false).flag).to be_falsey
+ expect(TypeSpec.new(flag: true).flag).to be_truthy
+ expect(TypeSpec.new(flag: "0").flag).to be_falsey
+ expect(TypeSpec.new(flag: "1").flag).to be_truthy
+ expect(TypeSpec.new(flag: 0).flag).to be_falsey
+ expect(TypeSpec.new(flag: 1).flag).to be_truthy
expect(TypeSpec.new(flag: false)).not_to be_flag
expect(TypeSpec.new(flag: true)).to be_flag
end
it "should parse an array" do