Почему Cucumber выдает ошибку MissingTamplate при запуске теста на veiw с расширением index.html. haml ? (Установлены Rails 4, Cucumber, Capybara, Haml. Все представления закодированы с помощью разметки haml. Все файлы представлений на месте. При изменении имени файла на index.html.erb ошибка не возникает! Почему ??? )
Поиск в Google для решения plm не помог
ec2-user:~/environment/01-hw-saas/myrottenpotatoes $ cucumber features/AdMovie.feature
Using the default profile...
Feature: User can manually add movie
Scenario: Add a movie # features/AdMovie.feature:3
Given I am on the RottenPotatoes home page # features/step_definitions/web_steps.rb:44
Missing template movies/index, application/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
* "/home/ec2-user/environment/01-hw-saas/myrottenpotatoes/app/views"
(ActionView::MissingTemplate)
./features/step_definitions/web_steps.rb:45:in `/^(?:|I )am on (.+)$/'
features/AdMovie.feature:4:in `Given I am on the RottenPotatoes home page'
When I follow "Add new movie" # features/step_definitions/web_steps.rb:56
Then I should be on the Create New Movie page # features/step_definitions/web_steps.rb:230
When I fill in "Title" with "Men In Black" # features/step_definitions/web_steps.rb:60
And I select "PG-13" from "Rating" # features/step_definitions/web_steps.rb:85
And I press "Save Changes" # features/step_definitions/web_steps.rb:52
Then I should be on the RottenPotatoes home page # features/step_definitions/web_steps.rb:230
And I should see "Men In Black" # features/step_definitions/web_steps.rb:105
Failing Scenarios:
cucumber features/AdMovie.feature:3 # Scenario: Add a movie
1 scenario (1 failed)
8 steps (1 failed, 7 skipped)
0m0.063s
ec2-user:~/environment/01-hw-saas/myrottenpotatoes $
Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.10'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'cucumber-rails', :require => false
gem 'cucumber-rails-training-wheels' # some pre-fabbed step definitions
gem 'database_cleaner' # to clear Cucumber's test database between runs
gem 'capybara' # lets Cucumber pretend to be a web browser
gem 'launchy' # a useful debugging aid for user stories
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
# Use Haml for templates
gem 'haml'
end
Ожидается, что огурец "увидит" файлы .haml
скриншот теста рабочей области + функция огурца здесь ...