Sha256: a00be0eda959d5bb7e5d0b18225d70f913126bda8814ed235e51786aa4c05031

Contents?: true

Size: 834 Bytes

Versions: 5

Compression:

Stored size: 834 Bytes

Contents

require 'spec_helper'
require 'generators/controller_resources/install_generator'

module ControllerResources
  RSpec.describe InstallGenerator, :type => :generator do
    destination Rails.root.join('tmp/generators')

    before do
      prepare_destination and run_generator
    end

    it "creates the locale file" do
      assert_file "config/locales/responders.en.yml", <<YAML
en:
  flash:
    actions:
      create:
        notice: '%{resource_name} was successfully created.'
        # alert: '%{resource_name} could not be created.'
      update:
        notice: '%{resource_name} was successfully updated.'
        # alert: '%{resource_name} could not be updated.'
      destroy:
        notice: '%{resource_name} was successfully destroyed.'
        alert: '%{resource_name} could not be destroyed.'
YAML
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
controller_resources-0.0.5 spec/generators/controller_resources/install_generator_spec.rb
controller_resources-0.0.4 spec/generators/controller_resources/install_generator_spec.rb
controller_resources-0.0.3 spec/generators/controller_resources/install_generator_spec.rb
controller_resources-0.0.2 spec/generators/controller_resources/install_generator_spec.rb
controller_resources-0.0.1 spec/generators/controller_resources/install_generator_spec.rb