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

Merged
merged 1 commit into from Nov 15, 2013

Conversation

Projects
None yet
3 participants
@myronmarston
Member

myronmarston commented Nov 14, 2013

No description provided.

@myronmarston myronmarston referenced this pull request in rspec/rspec-rails Nov 14, 2013

Merged

Removes --webrat #850

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Nov 14, 2013

Member

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

Member

JonRowe commented Nov 14, 2013

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

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Nov 14, 2013

Member

LGTM though.

Member

JonRowe commented Nov 14, 2013

LGTM though.

@myronmarston

This comment has been minimized.

Show comment
Hide comment
@myronmarston

myronmarston Nov 14, 2013

Member

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.

Member

myronmarston commented Nov 14, 2013

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

This comment has been minimized.

Show comment
Hide comment
@myronmarston

myronmarston Nov 14, 2013

Member

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.

Member

myronmarston commented Nov 14, 2013

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

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Nov 14, 2013

Member

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 👍 :)

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

Merge pull request #1180 from rspec/one-line-expect-syntax
Add `is_expected` for expect-based one-liner syntax.

@myronmarston myronmarston merged commit 2520cf3 into master Nov 15, 2013

1 check passed

default The Travis CI build passed
Details

@myronmarston myronmarston deleted the one-line-expect-syntax branch Nov 15, 2013

@xaviershay

This comment has been minimized.

Show comment
Hide comment
@xaviershay

xaviershay Nov 15, 2013

Member

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

Member

xaviershay commented Nov 15, 2013

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

@JonRowe

This comment has been minimized.

Show comment
Hide comment
@JonRowe

JonRowe Nov 15, 2013

Member

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

Member

JonRowe commented Nov 15, 2013

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

@myronmarston

This comment has been minimized.

Show comment
Hide comment
@myronmarston

myronmarston Nov 15, 2013

Member

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.

Member

myronmarston commented Nov 15, 2013

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.

@yujinakayama yujinakayama referenced this pull request in yujinakayama/transpec Nov 15, 2013

Closed

Support conversion of one-liner syntax #25

@alindeman alindeman referenced this pull request in rspec/rspec-rails Nov 22, 2013

Closed

Update the style of generated/scaffolded specs #854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment