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

Add is_expected for expect-based one-liner syntax. #1180

Merged
merged 1 commit into from
Nov 15, 2013

Conversation

myronmarston
Copy link
Member

No description provided.

@JonRowe
Copy link
Member

JonRowe commented Nov 14, 2013

Whilst I'm a 👍 on this, didn't we debate not doing this :P

@JonRowe
Copy link
Member

JonRowe commented Nov 14, 2013

LGTM though.

@myronmarston
Copy link
Member Author

We discussed it. I see enough questions/comments from users indicating confusion over expect and the one-liner syntax that I thought it worth adding, particularly since the implementation is so trivial and easy to understand.

@myronmarston
Copy link
Member Author

I think I'll backport this to 2.99 so that it can be available for transpec to convert during the upgrade process. Gonne leave it open until I have that PR ready so I don't forget.

@JonRowe
Copy link
Member

JonRowe commented Nov 14, 2013

Yeah given the number of "whats the expect equivalent of" I think it's worth while. I and @mootpointer were discussing doing this ages ago but never got around to it so 👍 :)

myronmarston added a commit that referenced this pull request Nov 15, 2013
Add `is_expected` for expect-based one-liner syntax.
@myronmarston myronmarston merged commit 2520cf3 into master Nov 15, 2013
@myronmarston myronmarston deleted the one-line-expect-syntax branch November 15, 2013 00:26
@xaviershay
Copy link
Member

I thought this was what we were moving to rspec-its, guess not.

@JonRowe
Copy link
Member

JonRowe commented Nov 15, 2013

No thats its(:thing) {} not at all related to example { should do_something }

@myronmarston
Copy link
Member Author

Right...its is just the its syntax that generates a nested example group and example based on the attribute structure of the subject. This is just a general mechanism for one-liner examples. It's useful but can easily be abused.

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.

None yet

3 participants