class ValueMonadTest

Attributes

struct[RW]

Public Instance Methods

setup() click to toggle source
# File minitest-5.13.0/test/minitest/test_minitest_spec.rb, line 1023
def setup
  @struct = { :_ => "a", :value => "b", :expect => "c" }
  def @struct.method_missing k # think openstruct
    self[k]
  end
end
test_value_monad_expect_alias() click to toggle source
# File minitest-5.13.0/test/minitest/test_minitest_spec.rb, line 1038
def test_value_monad_expect_alias
  assert_equal "c", struct.expect
end
test_value_monad_method() click to toggle source
# File minitest-5.13.0/test/minitest/test_minitest_spec.rb, line 1030
def test_value_monad_method
  assert_equal "a", struct._
end
test_value_monad_value_alias() click to toggle source
# File minitest-5.13.0/test/minitest/test_minitest_spec.rb, line 1034
def test_value_monad_value_alias
  assert_equal "b", struct.value
end