[rspec-users] Possible improvements to routing spec API

Wincent Colaiuta win at wincent.com
Mon Jul 5 13:18:51 EDT 2010


El 05/07/2010, a las 18:58, Wincent Colaiuta escribió:

> El 05/07/2010, a las 18:18, David Chelimsky escribió:
> 
>> Slight tangent - one nice thing about 'recognize' as a matcher name is we get this for free:
>> 
>> it { should_not recognize(:get => '/wiki/foo') }
> 
> True, but with "get()" we can already do:
> 
>  it { get('/wiki/foo').should_not be_routable }
> 
> Which is effectively the same isn't it?

Bah, I take that back. Just looked and I see that the "be_routable" matcher expects its params to be of the form:

  { :method => 'path' }

And get() is giving it params of the form:

  { :method => :get, :path => 'path' }

Cheers,
Wincent



More information about the rspec-users mailing list