Sha256: 7d30ea42ed2804d36dc52d12693319179773ee7ad2e368698759677659ecdfb2
Contents?: true
Size: 896 Bytes
Versions: 6
Compression:
Stored size: 896 Bytes
Contents
require "helper" require "generators/minitest/scaffold/scaffold_generator" class TestScaffoldGenerator < GeneratorTest def test_scaffold_generator assert_output(/create test\/controllers\/users_controller_test.rb/m) do Minitest::Generators::ScaffoldGenerator.start ["user"] end assert File.exists? "test/controllers/users_controller_test.rb" contents = File.read "test/controllers/users_controller_test.rb" assert_match(/class UsersControllerTest/m, contents) end def test_scaffold_generator_spec assert_output(/create test\/controllers\/users_controller_test.rb/m) do Minitest::Generators::ScaffoldGenerator.start ["user", "--spec"] end assert File.exists? "test/controllers/users_controller_test.rb" contents = File.read "test/controllers/users_controller_test.rb" assert_match(/describe UsersController do/m, contents) end end
Version data entries
6 entries across 6 versions & 1 rubygems