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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dba43aa68a826eeb48e8f3dc6dee8a8fcdbf793a
4
- data.tar.gz: b6f91f9696b8b2fa184f31340e02ca915306bee6
3
+ metadata.gz: fe0cc8adcc9dcbf0abde793aa42bf497b5cc8efe
4
+ data.tar.gz: ddad652df3ae20eace8ef0f05e76150f5fb36a4a
5
5
  SHA512:
6
- metadata.gz: 9a556146945d4b2dd4354f40d016543ff595ec828a1b44f47c18b7ba5bb896bbfabe160be329031986d8a306c164af2d353fa5e24ffe3ac22798c0e6d42723a8
7
- data.tar.gz: 0a53215447e698f233587bd8b0bfd5550a86dd19a9368858028924b268eec15ae7d7feaedc3e7aab9f5ad2b692061fcdbd039bf3653c4fc2cea38398444318a1
6
+ metadata.gz: 5993e35ad333303a9d75140fd48d6d7fb1519a10f9f99179a9aa0e3e2ca661b7d088ff0ea0775b4c861ed7bca66a7002940e3585db8149893e8ddb088619e522
7
+ data.tar.gz: e97c3c5d18443b1946876e4d56a074b72543c48cfe92b11fb5b7f99f7c23fefa32a9899508fa10e2476e16a2482c44b0ad2b10b4ce948363940f90934c4266f0
data/README.rdoc CHANGED
@@ -1,5 +1,7 @@
1
1
  = less_interactions
2
2
 
3
+ {<img src="https://travis-ci.org/LessEverything/less_interactions.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/LessEverything/less_interactions]
4
+
3
5
  A new way to think about your Ruby applications.
4
6
 
5
7
  == What is it?
@@ -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.11"
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"]
@@ -20,6 +20,9 @@ module Less
20
20
  end
21
21
  nils.merge(options).each do |name, value|
22
22
  instance_variable_set "@#{name}", value
23
+ if respond_to? "#{name}="
24
+ send "#{name}=", value
25
+ end
23
26
  end
24
27
  end
25
28
 
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: less_interactions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Minciu