matest 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f47190123714ba2772174d6757acfde316f1fc49
4
- data.tar.gz: edc3a3e9e8ef5ee41c7d133adc365ad15ff6b6cf
3
+ metadata.gz: 106a40de6a36b7d1d7221244deda124306329545
4
+ data.tar.gz: c093d22db122b4293f588613501213496f5974a8
5
5
  SHA512:
6
- metadata.gz: 21588530a6e4f6bc4dcd10a4ed36cb484777370a18576d6238ccfc54cc2760fd22c421d71e1f738cc6f82b3b2438c95fbd8d663ecaf45f7b87a975a8981a43c8
7
- data.tar.gz: dbe7b33e860a39434b43b82532905e319a9a3f9ca5eaea640d25834af214abb71696bc387141f1a2a591d07dce5810bb933b71ff1aeed651baf62f6e3f14ef71
6
+ metadata.gz: 84a55dd97dc70e9af4e8a6e51c70fe3b321aadf5aadd7d3e57da14a266a354885588c8268512d47bcd544afa83fcdcac4355ddb41ca4ab71f239369ceffd3c24
7
+ data.tar.gz: c17087cc4946f55fa00b9d8b5a2958573ee6e02e6a4cb3ff699fe5025cbe1c3ed71586ffc27441e7617abc9a9d982a195d182cf61e49ed50eae834062cf09ee6
data/lib/matest.rb CHANGED
@@ -9,10 +9,10 @@ module Matest
9
9
  attr_reader :info
10
10
  attr_reader :printer
11
11
 
12
- def initialize(printer: SpecPrinter.new)
12
+ def initialize(options={})
13
13
  @example_groups = []
14
14
  @info = {}
15
- @printer = printer
15
+ @printer = options[:printer] || SpecPrinter.new
16
16
  end
17
17
 
18
18
  def self.runner
@@ -50,7 +50,7 @@ module Matest
50
50
  @__description = description
51
51
  lets.each do |let|
52
52
  self.class.let(let.var_name, &let.block)
53
- send(let.var_name) if let.and_call
53
+ send(let.var_name) if let.bang
54
54
  end
55
55
  end
56
56
 
@@ -72,12 +72,12 @@ module Matest
72
72
  class Let
73
73
  attr_reader :var_name
74
74
  attr_reader :block
75
- attr_reader :and_call
75
+ attr_reader :bang
76
76
 
77
- def initialize(var_name, block, and_call=false)
77
+ def initialize(var_name, block, bang=false)
78
78
  @var_name = var_name
79
79
  @block = block
80
- @and_call = and_call
80
+ @bang = bang
81
81
  end
82
82
  end
83
83
 
@@ -123,12 +123,12 @@ module Matest
123
123
  end
124
124
  end
125
125
 
126
- def let(var_name, and_call=false, &block)
127
- lets << Let.new(var_name, block, and_call=false)
126
+ def let(var_name, bang=false, &block)
127
+ lets << Let.new(var_name, block, bang=false)
128
128
  end
129
129
 
130
130
  def let!(var_name, &block)
131
- lets << Let.new(var_name, block, and_call=true)
131
+ lets << Let.new(var_name, block, bang=true)
132
132
  end
133
133
 
134
134
  def run_spec(spec)
@@ -1,3 +1,3 @@
1
1
  module Matest
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti