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

allow one column data-table to be passed as parameter #48

Merged
merged 1 commit into from
Sep 14, 2014

Conversation

Fuud
Copy link
Contributor

@Fuud Fuud commented Aug 30, 2014

This pull-request allows values from one-column data-table to be passed as parameter. For example:

def "allow one column to be passed as parameter"(a) {
    expect:
    a == 3

    where:
    a | _
    3 | _
  }

@Fuud
Copy link
Contributor Author

Fuud commented Sep 3, 2014

@alkemist @pniederw any comments?

@ldaley
Copy link
Member

ldaley commented Sep 4, 2014

@Fuud I'm not sure this is preferable to the existing syntax.

def "allow one column to be passed as parameter"(a) {
    expect:
    a == 3

    where:
    a << [3]
  }

So my preference would be not to add this.

Thanks for taking the time on the contribution regardless. Peter might want this, so it's not over yet.

@pniederw
Copy link
Contributor

pniederw commented Sep 4, 2014

@alkemist: The one-column syntax happens to work already, without Spock doing anything special to make it work. This PR makes it possible to use one-column syntax with an explicit argument list of the form (a) rather than (a, _), which kind of makes sense. Technically this is a breaking change, but it seems rather unlikely that any existing code would be using (a, _) instead of (). Hence I'm inclined to merge this.

@pniederw
Copy link
Contributor

pniederw commented Sep 4, 2014

@Fuud Thanks for submitting the most subtle pull request ever. :-) I'll have a look at this soon.

@ldaley
Copy link
Member

ldaley commented Sep 4, 2014

@pniederw then +1 on the merge.

@Fuud
Copy link
Contributor Author

Fuud commented Sep 14, 2014

@alkemist @pniederw any progress?

@pniederw pniederw merged commit 104c084 into spockframework:groovy-1.8 Sep 14, 2014
@pniederw
Copy link
Contributor

This is now merged. Thanks for your contribution.

php-coder added a commit to php-coder/mystamps that referenced this pull request Jul 6, 2015
@robfletcher robfletcher modified the milestone: 1.1-rc-1 Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants