lopata 0.1.15 → 0.1.16

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lopata.rb +23 -0
  3. data/lib/lopata/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bcc4430dec94673cafa7b78a1ce7a1a9290539fdfc6c74d452db6bdbb36562e
4
- data.tar.gz: f2cab1b0033f5d8a44d4bd9beba5b2b6c354b8ec05bd9ea91cf7ee329b1c0626
3
+ metadata.gz: 774b79e80dea037bec71641e42289e46c8b756e7928fb2d928e448ccf9de7429
4
+ data.tar.gz: 262c23ee9ab55b1d3258bd41124ccce45bdb968b5afeeb67b778a30c293adc80
5
5
  SHA512:
6
- metadata.gz: bf4791606e84c616316e54fd191687e9b21ce86d47b627228a66b5b936886a28ffde9b4d5a50a52de72296ed7b957fb3c8eaa54ca5309d637ced84b080e4aa89
7
- data.tar.gz: f4634151931554ed5583d04dc807929d56e85072bb0203be6548b94bfda6f7dfaa3eb2387505f7027eed8692c0c16bdaa6892f420ae826654713d268440108ea
6
+ metadata.gz: 6415bf6ab545f56a68cd8b6cf84c7f1e4a8322fc8615afd782b86590cb458bc64c493ac783ab952fc76ab085e0c4080cf85750bc6e4da120685775f4a6b7970a
7
+ data.tar.gz: d75b4a44b1ca80254b6ffca2822a166b263131facc4cef869fb0df4c437987ad421a716933eb356dce37bf742066613e384ce63478b9ab1c11be1660834519d9
data/lib/lopata.rb CHANGED
@@ -66,6 +66,29 @@ module Lopata
66
66
  end
67
67
  end
68
68
 
69
+ # Register the shared step for context.
70
+ #
71
+ # shared_context is a shortcat for shared_step('name') { context('name') { .. } }. The block will be arrounded into the context call.
72
+ #
73
+ # @example
74
+ # Lopata.shared_context 'calculation' do
75
+ # it('correct') { expect(1 + 1).to eq 2 }
76
+ # it('incorrect') { expect(1 + 2).to eq 4 }
77
+ # end
78
+ #
79
+ # Shared context may be used in scenarios by name:
80
+ # @example
81
+ # Lopata.define 'verify calcuation in context' do
82
+ # verify 'calculation'
83
+ # end
84
+ # @param name [String] shared step unique name, will be used as a context's name
85
+ # @param block [Block] shared context definition
86
+ def self.shared_context(name, &block)
87
+ Lopata::SharedStep.register(name) do
88
+ context(name, &block)
89
+ end
90
+ end
91
+
69
92
  # Yields the global configuration to a block.
70
93
  # @yield [Lopata::Configuration] global configuration
71
94
  #
@@ -1,6 +1,6 @@
1
1
  module Lopata
2
2
  # @private
3
3
  module Version
4
- STRING = '0.1.15'
4
+ STRING = '0.1.16'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lopata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Volochnev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-10 00:00:00.000000000 Z
11
+ date: 2021-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -138,5 +138,5 @@ requirements: []
138
138
  rubygems_version: 3.2.15
139
139
  signing_key:
140
140
  specification_version: 4
141
- summary: lopata-0.1.15
141
+ summary: lopata-0.1.16
142
142
  test_files: []