Sha256: 7fe4eb9d6c1dd04918aa9cfa2a1c8a82316b00d466e425d440b9299f6bdf32ef

Contents?: true

Size: 1.64 KB

Versions: 7

Compression:

Stored size: 1.64 KB

Contents

Feature:
  As a developer
  In order to use image processing within Mercury
  I should be able to use a generator to setup my application

  Scenario: I can install the image processing files required for Mercury
    Given I have created a new rails application
    When I successfully run `bundle exec rails generate mercury:install:images --trace`
    Then the following files should exist:
      | app/controllers/mercury/images_controller.rb |
      | app/models/mercury/image.rb |
    And the file "app/models/mercury/image.rb" should contain "class Mercury::Image < ActiveRecord::Base"
    And should have the migration "create_mercury_images.rb"
    And the file "config/routes.rb" should contain:
      """
          namespace :mercury do
            resources :images
          end
      """
    And the file "Gemfile" should contain "gem 'paperclip'"

  Scenario: I can install the image processing files required for Mercury using Mongoid
    Given I have created a new rails application
    When I successfully run `bundle exec rails generate mercury:install:images --orm mongoid --trace`
    Then the following files should exist:
      | app/controllers/mercury/images_controller.rb |
      | app/models/mercury/image.rb |
    And the file "app/models/mercury/image.rb" should contain:
    """
    class Mercury::Image
      include Mongoid::Document
      include Mongoid::Paperclip
    """
    And should not have the migration "create_mercury_images.rb"
    And the file "config/routes.rb" should contain:
      """
          namespace :mercury do
            resources :images
          end
      """
    And the file "Gemfile" should contain "gem 'paperclip'"

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
kiteditor-1.0.12 features/generators/images.feature
mercury-rails-0.9.0 features/generators/images.feature
mercury-rails-0.8.0 features/generators/images.feature
mercury-rails-0.7.1 features/generators/images.feature
mercury-rails-0.7.0 features/generators/images.feature
mercury-rails-0.6.0 features/generators/images.feature
mercury-rails-0.5.0 features/generators/images.feature