Class: Assert::RakeTasks::Scope
- Inherits:
-
Object
- Object
- Assert::RakeTasks::Scope
- Defined in:
- lib/assert/rake_tasks/scope.rb
Instance Attribute Summary collapse
-
#nested_files ⇒ Object
readonly
Returns the value of attribute nested_files.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#path_file_list ⇒ Object
readonly
Returns the value of attribute path_file_list.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
-
#test_tasks ⇒ Object
readonly
Returns the value of attribute test_tasks.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ Scope
constructor
A new instance of Scope.
- #namespace ⇒ Object
-
#to_test_task ⇒ Object
return a test task covering the scopes nested files plus path file but only if there are nested files.
Constructor Details
#initialize(path) ⇒ Scope
Returns a new instance of Scope.
13 14 15 16 17 18 19 20 |
# File 'lib/assert/rake_tasks/scope.rb', line 13 def initialize(path) @path = path @nested_files = get_nested_files @path_file_list = build_path_file_list @test_tasks = build_test_tasks @scopes = build_scopes end |
Instance Attribute Details
#nested_files ⇒ Object (readonly)
Returns the value of attribute nested_files.
11 12 13 |
# File 'lib/assert/rake_tasks/scope.rb', line 11 def nested_files @nested_files end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
11 12 13 |
# File 'lib/assert/rake_tasks/scope.rb', line 11 def path @path end |
#path_file_list ⇒ Object (readonly)
Returns the value of attribute path_file_list.
11 12 13 |
# File 'lib/assert/rake_tasks/scope.rb', line 11 def path_file_list @path_file_list end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
11 12 13 |
# File 'lib/assert/rake_tasks/scope.rb', line 11 def scopes @scopes end |
#test_tasks ⇒ Object (readonly)
Returns the value of attribute test_tasks.
11 12 13 |
# File 'lib/assert/rake_tasks/scope.rb', line 11 def test_tasks @test_tasks end |
Class Method Details
.test_file_suffixes ⇒ Object
7 8 9 |
# File 'lib/assert/rake_tasks/scope.rb', line 7 def self.test_file_suffixes ['_test.rb', '_tests.rb'] end |
Instance Method Details
#namespace ⇒ Object
22 23 24 |
# File 'lib/assert/rake_tasks/scope.rb', line 22 def namespace File.basename(@path).to_sym end |
#to_test_task ⇒ Object
return a test task covering the scopes nested files plus path file but only if there are nested files
28 29 30 31 32 33 34 |
# File 'lib/assert/rake_tasks/scope.rb', line 28 def to_test_task if !self.nested_files.empty? TestTask.new(@path) do |tt| tt.files = self.path_file_list + self.nested_files end end end |