質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

RSpec

RSpecはRuby用のBDD(behaviour-driven development)フレームワークです。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

684閲覧

Rspecでのエラーについて

bababa

総合スコア10

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

RSpec

RSpecはRuby用のBDD(behaviour-driven development)フレームワークです。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/06/09 05:32

問題について・エラー内容

Rspecを流すと、preset_dateのとこだけエラーになる。
他の箇所では落ちないのに、なんでここだけ落ちるのか。
一応、エラー内容貼っときます。

Failures: 1) ClickLogReport click 先月のクリックログのデータが1件のとき 先月で検索して総件数が1件であること Failure/Error: select "先月", from: "preset_date" Capybara::ElementNotFound: Unable to find select box "preset_date" that is not disabled and Unable to find input box with datalist completion "preset_date" that is not disabled # ./spec/features/administrator/report_controller/click_log_report_spec.rb:939:in `block (4 levels) in <top (required)>' # ------------------ # --- Caused by: --- # Capybara::ElementNotFound: # Unable to find select box "preset_date" that is not disabled # ./spec/features/administrator/report_controller/click_log_report_spec.rb:939:in `block (4 levels) in <top (required)>' 2) ClickLogReport click 先月のクリックログのデータが2件のとき 先月で検索して総件数が2件であること Failure/Error: select "先月", from: "preset_date" Capybara::ElementNotFound: Unable to find select box "preset_date" that is not disabled and Unable to find input box with datalist completion "preset_date" that is not disabled # ./spec/features/administrator/report_controller/click_log_report_spec.rb:953:in `block (4 levels) in <top (required)>' # ------------------ # --- Caused by: --- # Capybara::ElementNotFound: # Unable to find select box "preset_date" that is not disabled # ./spec/features/administrator/report_controller/click_log_report_spec.rb:953:in `block (4 levels) in <top (required)>' Finished in 2 minutes 19.2 seconds (files took 1 minute 44.87 seconds to load) 45 examples, 2 failures, 1 pending

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

describe "select_date" do の中に
from: "preset_date"を入れないと使えないということでした!

投稿2020/06/09 06:13

bababa

総合スコア10

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問