Sha256: 950ca18eb07b55bdb190597b81f2bf71d6db20339572907703c4de44355b6038

Contents?: true

Size: 762 Bytes

Versions: 10

Compression:

Stored size: 762 Bytes

Contents

require "helper"
require "generators/mini_test/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

10 entries across 10 versions & 1 rubygems

Version Path
minitest-rails-1.0.1 test/generators/test_route_generator.rb
minitest-rails-1.0.0 test/generators/test_route_generator.rb
minitest-rails-1.0.0.beta3 test/generators/test_route_generator.rb
minitest-rails-1.0.0.beta2 test/generators/test_route_generator.rb
minitest-rails-1.0.0.beta1 test/generators/test_route_generator.rb
minitest-rails-0.9.2 test/generators/test_route_generator.rb
minitest-rails-0.9.1 test/generators/test_route_generator.rb
minitest-rails-0.9.0 test/generators/test_route_generator.rb
minitest-rails-0.5.2 test/generators/test_route_generator.rb
minitest-rails-0.5.1 test/generators/test_route_generator.rb