mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
4fe0732713
* Use "Given" instead of "And" as first scenario step * Remove unnecessary step The following step already invokes this step * Remove setup in feature that doesn't do anything As this referenced "i18n-test-app", but later we run "i18n-mixed-sources", these steps weren't doing anything. * Avoid referencing the same fixture twice The step "the Server is running at" invokes the "a fixture app" step, followed by "the Server is running" step.
43 lines
1.3 KiB
Gherkin
43 lines
1.3 KiB
Gherkin
Feature: Move files
|
|
|
|
Scenario: Move one path to another
|
|
Given a fixture app "large-build-app"
|
|
And a file named "config.rb" with:
|
|
"""
|
|
move_file "/static.html", "/static2.html"
|
|
"""
|
|
And the Server is running
|
|
When I go to "/static.html"
|
|
Then I should see 'Not Found'
|
|
When I go to "/static2.html"
|
|
Then I should see 'Static, no code!'
|
|
|
|
Scenario: Move one path to another with directory indexes
|
|
Given a fixture app "large-build-app"
|
|
And a file named "config.rb" with:
|
|
"""
|
|
activate :directory_indexes
|
|
move_file "/static.html", "/static2.html"
|
|
"""
|
|
And the Server is running
|
|
When I go to "/static.html"
|
|
Then I should see 'Not Found'
|
|
When I go to "/static/index.html"
|
|
Then I should see 'Not Found'
|
|
When I go to "/static2.html"
|
|
Then I should see 'Static, no code!'
|
|
|
|
Scenario: Move one path to another with directory indexes (using dest path)
|
|
Given a fixture app "large-build-app"
|
|
And a file named "config.rb" with:
|
|
"""
|
|
activate :directory_indexes
|
|
move_file "/static/index.html", "/static2.html"
|
|
"""
|
|
And the Server is running
|
|
When I go to "/static.html"
|
|
Then I should see 'Not Found'
|
|
When I go to "/static/index.html"
|
|
Then I should see 'Not Found'
|
|
When I go to "/static2.html"
|
|
Then I should see 'Static, no code!'
|