rspec/rspec-core — Issue #565: Syntax sugar for shared context/examples
Author: thedeeno
Created: 2012-01-29 17:10:26+00:00
State: open

I did an issue search and didn't find anything, so my apologies if this idea is old.

When writing shard examples and shared context like:

```
it_behaves_like "authenticated action" do
include_context "logged in user"
end
```

The normal order of context -> specification is reversed. I'd much prefer a syntax that maintains this flow.

```
when "user is logged in" do
it_behaves_like "authenticated action"
end
```

I'm not familiar enough with the core to know how much work this would be, but it certainly seems possible.

Thoughts?