Skip to content
This repository
tree: e6b0ea3f8a
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 18 lines (14 sloc) 0.52 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
require 'generators/generators_test_helper'
require 'rails/generators/rails/metal/metal_generator'

class MetalGeneratorTest < Rails::Generators::TestCase
  include GeneratorsTestHelper
  arguments %w(foo)

  def test_metal_skeleton_is_created
    run_generator
    assert_file "app/metal/foo.rb", /class Foo/
  end

  def test_check_class_collision
    content = capture(:stderr){ run_generator ["object"] }
    assert_match /The name 'Object' is either already used in your application or reserved/, content
  end
end
Something went wrong with that request. Please try again.