blob: 83d2429acfda189358a65535f1d1c5aa7db4b568 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
require "generators/generators_test_helper"
require "rails/generators/rails/assets/assets_generator"
class AssetsGeneratorTest < Rails::Generators::TestCase
include GeneratorsTestHelper
arguments %w(posts)
def test_assets
run_generator
assert_file "app/assets/stylesheets/posts.css"
end
def test_skipping_assets
run_generator ["posts", "--no-stylesheets"]
assert_no_file "app/assets/stylesheets/posts.css"
end
end
|