Class: FunWith::Gems::Testing::TestSuiteRunner
- Inherits:
-
Object
- Object
- FunWith::Gems::Testing::TestSuiteRunner
- Defined in:
- lib/fun_with/gems/testing/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.
7 8 9 |
# File 'lib/fun_with/gems/testing/test_suite_runner.rb', line 7 def initialize fwgem self.gem_const = fwgem end |
Instance Attribute Details
#gem_const ⇒ Object
Returns the value of attribute gem_const.
5 6 7 |
# File 'lib/fun_with/gems/testing/test_suite_runner.rb', line 5 def gem_const @gem_const end |
Instance Method Details
#passes_tests? ⇒ Boolean
11 12 13 14 |
# File 'lib/fun_with/gems/testing/test_suite_runner.rb', line 11 def passes_tests? result = self.run_tests result.passed? end |
#run_tests ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/fun_with/gems/testing/test_suite_runner.rb', line 16 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 |