Class: Gem2Rpm::TestSuite
- Inherits:
-
Object
- Object
- Gem2Rpm::TestSuite
- Includes:
- Enumerable
- Defined in:
- lib/gem2rpm/test_suite.rb
Defined Under Namespace
Classes: TestFramework
Constant Summary collapse
- TEST_FRAMEWORKS =
[ TestFramework.new('cucumber', %|cucumber|), TestFramework.new('minitest', %|ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'|), TestFramework.new('rspec', %|rspec spec|), TestFramework.new('shindo', %|shindont|), TestFramework.new('test-unit', %|ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'|), TestFramework.new('bacon', %|bacon -a|), ].freeze
Instance Method Summary collapse
-
#each ⇒ Object
Calls the given block once for each element in self, passing that element as a parameter.
-
#initialize(spec) ⇒ TestSuite
constructor
Returns new test suite list detected from Gem::Specification.
Constructor Details
#initialize(spec) ⇒ TestSuite
Returns new test suite list detected from Gem::Specification.
19 20 21 |
# File 'lib/gem2rpm/test_suite.rb', line 19 def initialize(spec) @items = detect_test_frameworks(spec) end |
Instance Method Details
#each ⇒ Object
Calls the given block once for each element in self, passing that element as a parameter. Returns the array itself. If no block is given, an Enumerator is returned.
26 27 28 29 30 31 |
# File 'lib/gem2rpm/test_suite.rb', line 26 def each # Return Enumerator when called withoug block. return to_enum(__callee__) unless block_given? @items.each { |item| yield item } end |