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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80d11c1484566f3f643bb2825130f84eceff5ecf
4
- data.tar.gz: 330847040474b05548a2e6c52a42365d5d30bc2d
3
+ metadata.gz: 64ba769ea69f1ae4d33f2efec4619925eb5203b6
4
+ data.tar.gz: 3267a7be3d48904fccf75895cf08d69c9ed67b9b
5
5
  SHA512:
6
- metadata.gz: 2c61d1c2d65b49fa9a7cd3b0383f7adec2ba90bedb68f69126fb9b261ab426f613052e6cca9a18c76b92dbb5ec59d26d411f38b0762ff711f953ff2d223b4b58
7
- data.tar.gz: 01ddf8061f5eeed178d44e30e174f9cd1654a50179d32a70fb610d21e82d16ae838ba2010afbcb7c2003352dd524b72fd6ffb731299e3a4c8cea649e9157887b
6
+ metadata.gz: dbca03a6002eb6142f268388a6fd1661445be309e0ce8fd101454190349c5bafb0d14ac5b0d5a308968d0760f196fa36dbbbc42cfb20e4c9f6dd5405c636e0f4
7
+ data.tar.gz: fea5016c06430b55229e132cc955aee9a0a7673cb69878861c3d8c0f8f95d09087d439436fc11dbbf04dadd88518bf48784fa96fa1ecbe40f9ed2a9553b21445
@@ -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.14"
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
 
@@ -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
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.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Minciu