Sha256: bbd28a7dd6614ca4342c894b68c943e8e7da0fb410960d83b83bee9d9ed7ecb5

Contents?: true

Size: 1007 Bytes

Versions: 5

Compression:

Stored size: 1007 Bytes

Contents

load 'cosmos/tools/test_runner/test.rb'

class ExampleTest < Cosmos::Test
  def setup
    puts "Setup"
  end

  def test_case_with_long_name
    puts "Running #{Cosmos::Test.current_test_suite}:#{Cosmos::Test.current_test}:#{Cosmos::Test.current_test_case}"
    Cosmos::Test.puts "This test verifies requirement 1"
    raise "error"
    puts "continue past raise"
  end

  def test_2
    puts "Running #{Cosmos::Test.current_test_suite}:#{Cosmos::Test.current_test}:#{Cosmos::Test.current_test_case}"
    Cosmos::Test.puts "This test verifies requirement 2"
    helper()
    wait(2)
  end

  def test_3
    puts "Running #{Cosmos::Test.current_test_suite}:#{Cosmos::Test.current_test}:#{Cosmos::Test.current_test_case}"
    raise SkipTestCase
  end

  def helper
    if $manual
      answer = ask "Are you sure?"
    else
      answer = 'y'
    end
  end

  def teardown
    puts "teardown"
  end
end

class MyTestSuite < Cosmos::TestSuite
  def initialize
    super()
    add_test('ExampleTest')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cosmosc2-demo-5.0.5 targets/INST/procedures/my_test_suite.rb
cosmosc2-demo-5.0.4 targets/INST/procedures/my_test_suite.rb
cosmosc2-demo-5.0.3 targets/INST/procedures/my_test_suite.rb
cosmosc2-demo-5.0.2 targets/INST/procedures/my_test_suite.rb
cosmosc2-demo-5.0.2.pre.beta2 targets/INST/procedures/my_test_suite.rb