Method: Buildr::TestTask#framework
- Defined in:
- lib/buildr/core/test.rb
#framework ⇒ Object
:call-seq:
framework => symbol
Returns the test framework, e.g. :junit, :testng.
375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/buildr/core/test.rb', line 375 def framework unless @framework # Start with all frameworks that apply (e.g. JUnit and TestNG for Java), # and pick the first (default) one, unless already specified in parent project. candidates = TestFramework.frameworks.select { |cls| cls.applies_to?(@project) } candidate = @project.parent && candidates.detect { |framework| framework.to_sym == @project.parent.test.framework } || candidates.first self.framework = candidate if candidate end @framework && @framework.class.to_sym end |