Skip to content

Commit

Permalink
Merge pull request #268 from take-cheeze/prereqs_alias
Browse files Browse the repository at this point in the history
Add alias `prereqs`.
  • Loading branch information
hsbt authored Jun 22, 2018
2 parents c963dc0 + bdc6406 commit 124a03b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rake/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module Rake
class Task
# List of prerequisites for a task.
attr_reader :prerequisites
alias prereqs prerequisites

# List of actions attached to a task.
attr_reader :actions
Expand Down
5 changes: 5 additions & 0 deletions test/test_rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,9 @@ def test_suggests_valid_rake_task_names
assert_match(/Did you mean\? test/, error.message)
end
end

def test_prereqs
t = task(a: %w[b c d e])
assert_equal %w[b c d e], t.prereqs
end
end

0 comments on commit 124a03b

Please sign in to comment.