2012-04-06 07:36:19 +00:00
|
|
|
Given /^the engine is mounted on a non standard path$/ do
|
|
|
|
Rails.application.routes.draw do
|
|
|
|
mount Locomotive::Engine => '/my-custom-path', :as => 'locomotive'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Then /^I should be able to access the backend$/ do
|
|
|
|
# Ensure we can access the backend
|
|
|
|
visit '/my-custom-path'
|
|
|
|
page.should have_content 'LocomotiveCMS'
|
|
|
|
|
|
|
|
# Ensure we can update the homepage content
|
|
|
|
click_link 'Home page'
|
|
|
|
click_button 'Save'
|
|
|
|
page.should have_content 'Page was successfully updated'
|
2012-04-06 08:08:06 +00:00
|
|
|
|
|
|
|
# Reset the routes back to normal once we are done
|
|
|
|
Rails.application.reload_routes!
|
2012-04-06 07:36:19 +00:00
|
|
|
end
|