We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3974af commit c9bce4bCopy full SHA for c9bce4b
spec/core/module/thunk_method_spec.rb
@@ -20,4 +20,17 @@
20
it "returns the coerced name" do
21
@class.thunk_method("a_reader", @value).should equal(:a_reader)
22
end
23
+
24
+ it "creates an executable that can be used to read the value" do
25
+ @class.thunk_method(:thunk, @value)
26
+ @class.instance_metho(d:thunk).executable.value.should equal(@value)
27
+ end
28
29
+ it "creates an executable that can be used to change the value" do
30
31
+ new_value = Object.new
32
+ @class.instance_method(:thunk).executable.value = new_value
33
+ @class.instance_method(:thunk).executable.value.should equal(new_value)
34
+ @class.new.thunk.should equal(new_value)
35
36
0 commit comments