development_reloading.feature 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Feature: Development Reloading
  2. In order to quickly develop applications
  3. As a developer
  4. I want the application to reload itself in development
  5. @requires-reloading
  6. Scenario: Reloading an updated model that a resource points to
  7. Given "app/admin/posts.rb" contains:
  8. """
  9. ActiveAdmin.register Post
  10. """
  11. And I am logged in
  12. And I create a new post with the title ""
  13. Then I should see a successful create flash
  14. Given I add "validates_presence_of :title" to the "post" model
  15. And I create a new post with the title ""
  16. Then I should not see a successful create flash
  17. And I should see a validation error "can't be blank"
  18. # TODO: Create a scenario that reloads one of the active admin
  19. # configuration files.
  20. #
  21. # @requires-reloading
  22. # Scenario: Reloading an updated model that a resource points to
  23. # Given "app/admin/posts.rb" contains:
  24. # """
  25. # ActiveAdmin.register Post
  26. # ActiveAdmin.register User
  27. # """
  28. # And I am logged in
  29. # Then I should see a menu item for "Posts"
  30. # Given "app/admin/posts.rb" contains:
  31. # """
  32. # ActiveAdmin.register Post, :as => "Blog"
  33. # ActiveAdmin.register User
  34. # """
  35. # When I follow "Users"
  36. # Then show me the page
  37. # Then I should see a menu item for "Blogs"
  38. # Then I should not see a menu item for "Posts"