lopata 0.1.16 → 0.1.18

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
  SHA256:
3
- metadata.gz: 774b79e80dea037bec71641e42289e46c8b756e7928fb2d928e448ccf9de7429
4
- data.tar.gz: 262c23ee9ab55b1d3258bd41124ccce45bdb968b5afeeb67b778a30c293adc80
3
+ metadata.gz: 648aa77ea8c480039ff21dc5b0ad56869252bf132878980b413cce036faba74e
4
+ data.tar.gz: e038f58383820b4fa57388c7b41c4a654bbf3fdb366e6f65517cf5e4e2e0ba1e
5
5
  SHA512:
6
- metadata.gz: 6415bf6ab545f56a68cd8b6cf84c7f1e4a8322fc8615afd782b86590cb458bc64c493ac783ab952fc76ab085e0c4080cf85750bc6e4da120685775f4a6b7970a
7
- data.tar.gz: d75b4a44b1ca80254b6ffca2822a166b263131facc4cef869fb0df4c437987ad421a716933eb356dce37bf742066613e384ce63478b9ab1c11be1660834519d9
6
+ metadata.gz: b48e9faf2da07942d82a0f336a7dcf146a36624cb4fb02913562821ca1862aefa4433e0a3cec56abf699019c998765e7eca5309bf54b8266483f0de78cdd97d9
7
+ data.tar.gz: 86a158bf2b5097e351acfeb84376f0d67615ea9fcde9e46108e997b2b100a91ea9d068ed96363a156ba9cb41f6bbc7965fcd2d65e655d11e7f8da0c0dbf3d281
data/exe/lopata CHANGED
File without changes
data/lib/lopata/runner.rb CHANGED
@@ -14,15 +14,17 @@ module Lopata
14
14
  option :rerun, type: :boolean, aliases: 'r'
15
15
  option :keep, type: :boolean, aliases: 'k'
16
16
  option :text, aliases: 't'
17
+ option :list, type: :boolean, aliases: 'l'
17
18
  def test(*args)
18
19
  trap_interrupt
19
20
  configure_from_options
20
21
  Lopata::Loader.load_shared_steps
21
22
  Lopata::Loader.load_scenarios(*args)
22
- world = Lopata.world
23
- world.notify_observers(:started, world)
24
- world.scenarios.each { |s| s.run }
25
- world.notify_observers(:finished, world)
23
+ if options[:list]
24
+ list_scenarios
25
+ else
26
+ run_scenarios
27
+ end
26
28
  end
27
29
 
28
30
  default_task :test
@@ -57,6 +59,17 @@ module Lopata
57
59
  def trap_interrupt
58
60
  trap('INT') { exit!(1) }
59
61
  end
62
+
63
+ def list_scenarios
64
+ Lopata.world.scenarios.each { |s| puts s.title }
65
+ end
66
+
67
+ def run_scenarios
68
+ world = Lopata.world
69
+ world.notify_observers(:started, world)
70
+ world.scenarios.each { |s| s.run }
71
+ world.notify_observers(:finished, world)
72
+ end
60
73
  end
61
74
  end
62
75
  end
@@ -15,6 +15,14 @@ class Lopata::Scenario
15
15
  @execution = execution
16
16
  end
17
17
 
18
+ # Provide a human-readable representation of this class
19
+ def inspect
20
+ "#<#{self.class.name} #{execution.title.inspect}>"
21
+ end
22
+ alias to_s inspect
23
+
24
+
25
+
18
26
  # Marks current step as pending
19
27
  # @example
20
28
  # it 'pending step' do
@@ -65,6 +73,12 @@ class Lopata::Scenario
65
73
  @scenario = Lopata::Scenario.new(self)
66
74
  end
67
75
 
76
+ # Provide a human-readable representation of this class
77
+ def inspect
78
+ "#<#{self.class.name} #{title.inspect}>"
79
+ end
80
+ alias to_s inspect
81
+
68
82
  def run
69
83
  @status = :running
70
84
  sort_steps
@@ -1,6 +1,6 @@
1
1
  module Lopata
2
2
  # @private
3
3
  module Version
4
- STRING = '0.1.16'
4
+ STRING = '0.1.18'
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.16
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Volochnev
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2022-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -120,7 +120,7 @@ homepage: https://github.com/avolochnev/lopata
120
120
  licenses:
121
121
  - MIT
122
122
  metadata: {}
123
- post_install_message:
123
+ post_install_message:
124
124
  rdoc_options: []
125
125
  require_paths:
126
126
  - lib
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubygems_version: 3.2.15
139
- signing_key:
139
+ signing_key:
140
140
  specification_version: 4
141
- summary: lopata-0.1.16
141
+ summary: lopata-0.1.18
142
142
  test_files: []