To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorview spec infers controller path and action
- Scenarios
-
- infer controller path
-
- Given
-
a file named "spec/views/widgets/new.html.erb_spec.rb" with:
require "spec_helper" describe "widgets/new" 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 examples should all pass
- infer action
-
- Given
-
a file named "spec/views/widgets/new.html.erb_spec.rb" with:
require "spec_helper" describe "widgets/new" 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 examples should all pass
- 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" 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 examples should all pass
Last published over 7 years ago by .