On Tue, Jul 12, 2011 at 16:03, Derek Prior wrote:
> I'm a newcomer to the list. Appologies if this has been discussed before,
> but all I could find with regards to specing scopes relates to those that
> filter records or apply sorting. What's the best way to spec a scope that
> uses the includes
Hey guys,
just wrote a helper for controller specs in the rails. Link to the gist -
https://gist.github.com/1080421 - to view with syntax highlight.
# Helper +action+ allows you to write something like
#
# describe "GET index" do
# action { get :index }
#
# context 'if user signed in' do
#
On Wed, Jul 13, 2011 at 11:06 AM, Alexander Glushkov wrote:
> Hey guys,
>
> just wrote a helper for controller specs in the rails. Link to the gist -
> https://gist.github.com/1080421 - to view with syntax highlight.
>
> # Helper +action+ allows you to write something like
> #
> # describe "GET in
Not exactly. It adds a before { 'your action call' } to the end of hooks
collection,
so that it will called at the very end, right before the spec call.
Compare two examples I provided in the comments.
___
rspec-users mailing list
rspec-users@rubyforge