Sha256: e5db50dff8228b3cda27f935476ac3a7dc21b0970381a5c5b57a8baa26b9bca8

Contents?: true

Size: 636 Bytes

Versions: 15

Compression:

Stored size: 636 Bytes

Contents

# frozen_string_literal: true

require "rails/generators/test_case"
require_relative "../test_helper"

class StimulusReflexGeneratorTest < Rails::Generators::TestCase
  tests StimulusReflexGenerator
  destination File.expand_path("../../tmp", __FILE__)
  setup :prepare_destination

  test "creates named controller and reflex files" do
    run_generator %w[demo]
    assert_file "app/javascript/controllers/application_controller.js"
    assert_file "app/javascript/controllers/demo_controller.js", /DemoReflex/
    assert_file "app/reflexes/application_reflex.rb"
    assert_file "app/reflexes/demo_reflex.rb", /DemoReflex/
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
stimulus_reflex-3.1.4 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-3.1.3 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-3.1.2 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-3.0.0 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.2.3 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.2.2 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.2.1 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.2.0 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.1.9 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.1.8 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.1.7 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.1.6 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.1.5 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.1.4 test/generators/stimulus_reflex_generator_test.rb
stimulus_reflex-2.1.3 test/generators/stimulus_reflex_generator_test.rb