spec/option_spec.rb in option-0.2.0 vs spec/option_spec.rb in option-0.3.0
- old
+ new
@@ -19,13 +19,13 @@
it "#get_or_else executes the block" do
None.get_or_else { "Some" }.must_equal "Some"
end
- it "#foreach does not execute the block" do
+ it "#each does not execute the block" do
expected = nil
- None.foreach { |v| expected = v }
+ None.each { |v| expected = v }
expected.must_be_nil
end
it "#or_nil should return nil" do
@@ -88,12 +88,12 @@
it "#get_or_else returns the value" do
Some(value).get_or_else { }.must_equal(value)
end
- it "#foreach executes the block passing the inner value" do
+ it "#each executes the block passing the inner value" do
expected = nil
- Some(value).foreach { |v| expected = v }
+ Some(value).each { |v| expected = v }
expected.must_equal(value)
end
it "#or_nil should return the inner value" do