Class: StormForge::Thor::Testcase

Inherits:
Base
  • Object
show all
Defined in:
lib/thor/testcase.rb

Instance Method Summary collapse

Instance Method Details

#listObject



16
17
18
19
20
21
22
# File 'lib/thor/testcase.rb', line 16

def list
  require_stormfile!

  StormForge.registry.each_pair do |name, test_case|
    puts name
  end
end

#update(name) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/thor/testcase.rb', line 3

def update(name)
  require_stormfile!

  test_case = StormForge.test_case(name.to_sym)

  raise Thor::Error, "Test case '#{name}' unknown!" unless test_case

  client.create_or_update(test_case)
rescue Faraday::Error::ConnectionFailed
  raise Thor::Error, "StormForger API not available :-/ (connection failed)"
end