Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions adore keyword arguments #174

Merged
merged 3 commits into from
Dec 2, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/test_rake_task_with_arguments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ def test_actions_of_various_arity_are_ok_with_args


def test_actions_adore_keywords
# A brutish trick to avoid parsing. Remove it once support for 1.9 and 2.0 is dropped
# https://ci.appveyor.com/project/ruby/rake/build/1.0.301
skip 'Keywords aren\'t a feature in this version' if RUBY_VERSION =~ /^1|^2\.0/
eval <<-RUBY, binding, __FILE__, __LINE__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need +1 to __LINE__

notes = []
t = task :t, [:reqr, :ovrd, :dflt] # required, overridden-optional, default-optional
verify = lambda do |name, expecteds, actuals|
Expand All @@ -103,6 +107,7 @@ def test_actions_adore_keywords

t.invoke('r', 'o')
assert_equal [*:a..:h], notes
RUBY
end

def test_arguments_are_passed_to_block
Expand Down