less_interactions 0.0.14 → 0.0.15
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/less_interactions.gemspec +1 -1
- data/lib/less_interactions/interaction.rb +1 -1
- data/test/interaction_test.rb +10 -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: 64ba769ea69f1ae4d33f2efec4619925eb5203b6
|
4
|
+
data.tar.gz: 3267a7be3d48904fccf75895cf08d69c9ed67b9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbca03a6002eb6142f268388a6fd1661445be309e0ce8fd101454190349c5bafb0d14ac5b0d5a308968d0760f196fa36dbbbc42cfb20e4c9f6dd5405c636e0f4
|
7
|
+
data.tar.gz: fea5016c06430b55229e132cc955aee9a0a7673cb69878861c3d8c0f8f95d09087d439436fc11dbbf04dadd88518bf48784fa96fa1ecbe40f9ed2a9553b21445
|
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.15"
|
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"]
|
@@ -47,8 +47,8 @@ module Less
|
|
47
47
|
# This will initialize your interaction with the options you pass to it and then call its {#run} method.
|
48
48
|
def self.run(context = {}, options = {})
|
49
49
|
me = new(context, options)
|
50
|
-
me.init
|
51
50
|
me.send :expectations_met?
|
51
|
+
me.init
|
52
52
|
me.run
|
53
53
|
end
|
54
54
|
|
data/test/interaction_test.rb
CHANGED
@@ -200,4 +200,14 @@ class InteractionTest < Test::Unit::TestCase
|
|
200
200
|
assert AnyInteractionWithOneNonNilParameter.run(:b => 1)
|
201
201
|
end
|
202
202
|
|
203
|
+
should "call expectations_met? before init" do
|
204
|
+
class ExpectationsMetBeforeInit < Less::Interaction
|
205
|
+
expects :a
|
206
|
+
expects_any :b, :c
|
207
|
+
def init; raise "Called init first"; end
|
208
|
+
def run; end
|
209
|
+
end
|
210
|
+
assert_raise(MissingParameterError) { ExpectationsMetBeforeInit.run() }
|
211
|
+
end
|
212
|
+
|
203
213
|
end
|