spec/option_spec.rb in option-0.0.1 vs spec/option_spec.rb in option-0.0.2

- old
+ new

@@ -62,11 +62,11 @@ it "should be aliased to None" do None.must_be_instance_of(NoneClass) end end -describe Some do +describe SomeClass do it "#to_a returns the value wrapped in an array" do Some(value).to_a.must_equal([value]) end @@ -130,23 +130,19 @@ it "#fold should map the proc over the value and return it" do Some(value).fold(proc { value * 2 }) { |v| v * 3 }.must_equal(36) end - it "should be aliased to Some" do - Some.must_equal(Some) - end - it "should wrap the creation of a Some" do - mock(Some).new(value) + mock(SomeClass).new(value) Some(value) RR.verify end end -describe Option do +describe OptionClass do it "must return a some if the passed value is not nil" do Option(value).must_equal(Some(value)) end