Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added cucumber test to ensure that controller.request.path_parameters…

… contains symbols for keys
  • Loading branch information...
commit bc987266b8b3aa2e0dd24fbb3510e70be613a165 1 parent 511ad01
@ndbroadbent ndbroadbent authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 features/view_specs/view_spec.feature
View
14 features/view_specs/view_spec.feature
@@ -158,3 +158,17 @@ Feature: view spec
"""
When I run `rspec spec/views/secrets`
Then the examples should all pass
+
+ Scenario: request.path_parameters should match Rails by using symbols for keys
+ Given a file named "spec/views/widgets/index.html.erb_spec.rb" with:
+ """
+ require "spec_helper"
+
+ describe "controller.request.path_parameters" do
+ it "matches the Rails environment by using symbols for keys" do
+ [:controller, :action].each { |k| controller.request.path_parameters.keys.should include(k) }
+ end
+ end
+ """
+ When I run `rspec spec/views`
+ Then the examples should all pass
Please sign in to comment.
Something went wrong with that request. Please try again.