Wow, that matcher works indeed!
Thank you very much for analysis and for a solution!

On Wednesday, September 7, 2011 7:51:08 PM UTC+4, Ruby-Forum.com User wrote:
>
> The following tests *do* work as expected:
>
>   describe "GET 'contact'" do
>     it "should be successful" do
>       { :get => 'pages/contact' }.should be_routable
>     end
>   end
>
>   describe "POST 'contact'" do
>     it "should be successful" do
>       { :post => 'pages/contact' }.should be_routable
>     end
>   end
>
> For instance, with this route:
>
> T2App::Application.routes.draw do
>   get "pages/contact"
> end
>
>
> I get these results:
>
> $ bundle exec rspec spec/
> No DRb server is running. Running in local process instead ...
> ..F
>
> Failures:
>
>   1) PagesController POST 'contact' should be successful
>      Failure/Error: { :post => 'pages/contact' }.should be_routable
>        expected {:post=>"pages/contact"} to be routable
>      # ./spec/controllers/pages_controller_spec.rb:28:in `block (3 
> levels) in <top (required)>'
>
> Finished in 0.12608 seconds
> 3 examples, 1 failure
>
> Failed examples:
>
> rspec ./spec/controllers/pages_controller_spec.rb:27 # PagesController 
> POST 'contact' should be successful
>
> -- 
> Posted via http://www.ruby-forum.com/.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/h_TyLb_CF8kJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to