Class: FunWith::Gems::TestSuiteRunner
- Inherits:
-
Object
- Object
- FunWith::Gems::TestSuiteRunner
- Defined in:
- lib/fun_with/gems/test_suite_runner.rb
Instance Attribute Summary collapse
-
#gem_const ⇒ Object
Returns the value of attribute gem_const.
Instance Method Summary collapse
-
#initialize(fwgem) ⇒ TestSuiteRunner
constructor
A new instance of TestSuiteRunner.
- #passes_tests? ⇒ Boolean
- #run_tests ⇒ Object
Constructor Details
#initialize(fwgem) ⇒ TestSuiteRunner
Returns a new instance of TestSuiteRunner.
6 7 8 |
# File 'lib/fun_with/gems/test_suite_runner.rb', line 6 def initialize fwgem self.gem_const = fwgem end |
Instance Attribute Details
#gem_const ⇒ Object
Returns the value of attribute gem_const.
4 5 6 |
# File 'lib/fun_with/gems/test_suite_runner.rb', line 4 def gem_const @gem_const end |
Instance Method Details
#passes_tests? ⇒ Boolean
10 11 12 13 |
# File 'lib/fun_with/gems/test_suite_runner.rb', line 10 def passes_tests? result = self.run_tests result.passed? end |
#run_tests ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/fun_with/gems/test_suite_runner.rb', line 15 def run_tests filepath = self.gem_const.root results = TestResults.new( self.gem_const ) puts "running tests on #{self.gem_const} from #{filepath}" results.output = `cd #{filepath} && rake test` results end |