Sha256: d0a78c10b1a1bdd78664c3600d4a9c33485d5d07d0cfa9dc8b2c40d54470fcc2
Contents?: true
Size: 1.31 KB
Versions: 12
Compression:
Stored size: 1.31 KB
Contents
Feature: view spec infers controller path and action Scenario: infer controller path Given a file named "spec/views/widgets/new.html.erb_spec.rb" with: """ require "spec_helper" describe "widgets/new.html.erb" do it "infers the controller path" do controller.request.path_parameters["controller"].should eq("widgets") end end """ When I run "rspec spec/views" Then the output should contain "1 example, 0 failures" Scenario: infer action Given a file named "spec/views/widgets/new.html.erb_spec.rb" with: """ require "spec_helper" describe "widgets/new.html.erb" do it "infers the controller path" do controller.request.path_parameters["action"].should eq("new") end end """ When I run "rspec spec/views" Then the output should contain "1 example, 0 failures" Scenario: do not infer action in a partial Given a file named "spec/views/widgets/_form.html.erb_spec.rb" with: """ require "spec_helper" describe "widgets/_form.html.erb" do it "includes a link to new" do controller.request.path_parameters["action"].should be_nil end end """ When I run "rspec spec/views" Then the output should contain "1 example, 0 failures"
Version data entries
12 entries across 12 versions & 1 rubygems