Skip to content

Commit

Permalink
Update Helper generator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
blowmage committed Jul 6, 2012
1 parent f6aeae3 commit 962f5cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_helper_generator.rb
Expand Up @@ -18,7 +18,7 @@ def test_helper_generator
assert_match(/create test\/helpers\/user_helper_test.rb/m, text)
assert File.exists? "test/helpers/user_helper_test.rb"
contents = open("test/helpers/user_helper_test.rb").read
assert_match(/class UserHelperTest < MiniTest::Rails::Helper/m, contents)
assert_match(/class UserHelperTest < MiniTest::Unit::TestCase/m, contents)
ensure
# TODO: Don"t write the files
# I agree, it would be better to mock the file getting written
Expand All @@ -32,7 +32,7 @@ def test_namespaced_helper_generator
assert_match(/create test\/helpers\/admin\/user_helper_test.rb/m, text)
assert File.exists? "test/helpers/admin/user_helper_test.rb"
contents = open("test/helpers/admin/user_helper_test.rb").read
assert_match(/class Admin::UserHelperTest < MiniTest::Rails::Helper/m, contents)
assert_match(/class Admin::UserHelperTest < MiniTest::Unit::TestCase/m, contents)
ensure
FileUtils.rm_r "test/helpers"
end
Expand All @@ -48,7 +48,7 @@ def test_helper_generator_spec
ensure
FileUtils.rm_r "test/helpers"
end

def test_helper_generator_spec
text = capture(:stdout) do
MiniTest::Generators::HelperGenerator.start ["admin/user", "--spec"]
Expand Down

0 comments on commit 962f5cb

Please sign in to comment.