"""
When I cd to ".."
And I successfully run `bundle exec rails new testapp --skip-bundle`
And I cd to "testapp"
And I comment out gem "turn" from my Gemfile
And I append to "Gemfile" with:
"""
gem "cucumber-rails"
gem "capybara"
gem "rspec"
gem "database_cleaner"
"""
When I add the "testengine" as a diesel engine
And I reset Bundler environment variable
And I run `bundle install --local`
And I successfully run `bundle exec rails generate cucumber:install --trace`
And I successfully run `bundle exec rails generate testengine:install --trace`
And I successfully run `bundle exec rake db:migrate db:schema:dump db:test:prepare --trace`
Scenario: test a generated app with a diesel engine
When I write to "features/examples.feature" with:
"""
Feature: view examples
Scenario: go to the examples page
When I go to the examples page
Then I should see "Hello there"
"""
When I write to "features/step_definitions/engine/example_steps.rb" with:
"""
Then %{I should see "Hello there"} do
page.should have_content("Hello there")
end
When "I go to the examples page" do
visit examples_path
end
"""
When I run `bundle exec cucumber features/examples.feature`
Then it should pass with:
"""
1 scenario (1 passed)
"""
Scenario: view generator descriptions from an app with a diesel engine
When I successfully run `bundle exec rails generate testengine:install -h`
Then the output should contain:
"""
Generate configuration, migration, and other essential files.
"""
Scenario: run the install generator twice
When I successfully run `bundle exec rails generate testengine:install --trace`
Then the output should not contain "Another migration is already named"