less_interactions 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +2 -0
- data/less_interactions.gemspec +1 -1
- data/lib/less_interactions/interaction.rb +3 -0
- data/test/interaction_test.rb +18 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe0cc8adcc9dcbf0abde793aa42bf497b5cc8efe
|
4
|
+
data.tar.gz: ddad652df3ae20eace8ef0f05e76150f5fb36a4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5993e35ad333303a9d75140fd48d6d7fb1519a10f9f99179a9aa0e3e2ca661b7d088ff0ea0775b4c861ed7bca66a7002940e3585db8149893e8ddb088619e522
|
7
|
+
data.tar.gz: e97c3c5d18443b1946876e4d56a074b72543c48cfe92b11fb5b7f99f7c23fefa32a9899508fa10e2476e16a2482c44b0ad2b10b4ce948363940f90934c4266f0
|
data/README.rdoc
CHANGED
data/less_interactions.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{less_interactions}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Eugen Minciu", "Steven Bristol"]
|
data/test/interaction_test.rb
CHANGED
@@ -23,6 +23,24 @@ class InteractionTest < Test::Unit::TestCase
|
|
23
23
|
InteractionExpectingInit.run
|
24
24
|
end
|
25
25
|
|
26
|
+
should "call init when running an interaction with an init method" do
|
27
|
+
class InteractionExpectingInit2 < Interaction
|
28
|
+
def run; self; end
|
29
|
+
def init; @a = 1; end
|
30
|
+
end
|
31
|
+
i = InteractionExpectingInit2.run
|
32
|
+
assert_equal 1, i.instance_variable_get(:@a)
|
33
|
+
end
|
34
|
+
|
35
|
+
should "call the writer if there is one" do
|
36
|
+
class InteractionWithWriter < Interaction
|
37
|
+
def run; self; end
|
38
|
+
def a= val; @a += 1; end
|
39
|
+
end
|
40
|
+
i = InteractionWithWriter.run a: 1
|
41
|
+
assert_equal 2, i.instance_variable_get(:@a)
|
42
|
+
end
|
43
|
+
|
26
44
|
should "call the run instance method when running an interaction" do
|
27
45
|
class InteractionExpectingRun < Interaction; end
|
28
46
|
InteractionExpectingRun.any_instance.expects(:run)
|