キュウリを使い始めたばかりで、ビュー内の部分をテストする方法がわかりません。
は、ここに私の機能
です キュウリ:posting.featureキュウリのRuby on Railsネストされたビューのテスト
Scenario: After having created job posting
Given I am authenticated as "administrator"
Given I am on the new posting page
When I press "Create Posting"
Then I should see "Back to list of all postings"
マイnew.html.haml(これは私が現在てるページです)
= link_to 'Logout', logged_out_url(@user)
%h1 New posting
= render 'form'
%br/
= link_to 'Cancel', postings_path
= form_for(@postings) do |posting_builder|
- if @postings.errors.any?
#error_explanation
%h2
= pluralize(@postings.errors.count, "error")
prohibited this posting from being saved:
%ul
- @postings.errors.full_messages.each do |msg|
%li= msg
.field
%b= posting_builder.label :title
%br/
= posting_builder.text_field :title
.field
%b= posting_builder.label :description
%br/
= posting_builder.text_field :description
.field
%b= posting_builder.label :requirements
%br/
= posting_builder.text_field :requirements
.field
%b= posting_builder.label :location
%br/
= posting_builder.text_field :location
.field
%b= posting_builder.label :Admin
%br/
= select("posting", "user_id", User.order('last_name ASC').collect {|u| [u.fullname, u.id]})
%br/
%br/
/Submit
.actions
= posting_builder.submit
が何か提案はあります
_form.html.haml(これは、その「投稿を作成」new.html.hamlにロードされているビューがあるボタン私がテストしたいと思います)どのように私はこの問題やリソース/私の質問に関連する例に取り組む必要がありますか?