Sha256: 6f529023b179d67dc47200ce374431030aeb081bafe6b789afbde053f9421c0d

Contents?: true

Size: 761 Bytes

Versions: 9

Compression:

Stored size: 761 Bytes

Contents

require "helper"
require "generators/minitest/route/route_generator"

class TestRouteGenerator < GeneratorTest

  def test_route_generator
    assert_output(/create  test\/routes\/route_test.rb/m) do
      Minitest::Generators::RouteGenerator.start
    end
    assert File.exists? "test/routes/route_test.rb"
    contents = File.read "test/routes/route_test.rb"
    assert_match(/class RouteTest/m, contents)
  end

  def test_route_generator_spec
    assert_output(/create  test\/routes\/route_test.rb/m) do
      Minitest::Generators::RouteGenerator.start ["--spec"]
    end
    assert File.exists? "test/routes/route_test.rb"
    contents = File.read "test/routes/route_test.rb"
    assert_match(/describe "Route Integration Test" do/m, contents)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
minitest-rails-2.2.1 test/generators/test_route_generator.rb
minitest-rails-2.2.0 test/generators/test_route_generator.rb
minitest-rails-2.1.1 test/generators/test_route_generator.rb
minitest-rails-2.1.0 test/generators/test_route_generator.rb
minitest-rails-2.0.3 test/generators/test_route_generator.rb
minitest-rails-2.0.2 test/generators/test_route_generator.rb
minitest-rails-2.0.1 test/generators/test_route_generator.rb
minitest-rails-2.0.0 test/generators/test_route_generator.rb
minitest-rails-2.0.0.beta1 test/generators/test_route_generator.rb