spec/option_spec.rb in option-0.0.3 vs spec/option_spec.rb in option-0.0.4
- old
+ new
@@ -30,10 +30,14 @@
it "#or_nil should return nil" do
None.or_nil.must_be_nil
end
+ it "#defined? should be false" do
+ None.defined?.must_equal(false)
+ end
+
it "#empty? should be true" do
None.empty?.must_equal(true)
end
it "#map should return itself" do
@@ -85,9 +89,13 @@
expected.must_equal(value)
end
it "#or_nil should return the inner value" do
Some(value).or_nil.must_equal(value)
+ end
+
+ it "#defined? should be true" do
+ Some(value).defined?.must_equal(true)
end
it "#empty? should be false" do
Some(value).empty?.must_equal(false)
end