test/test_hoe_travis.rb in hoe-travis-1.2 vs test/test_hoe_travis.rb in hoe-travis-1.3

- old
+ new

@@ -10,10 +10,12 @@ @hoe = Hoe.spec "blah" do developer 'author', 'email@example' developer 'silent', '' + license 'MIT' + self.readme_file = 'README.rdoc' end @hoe.extend Hoe::Travis @@ -28,14 +30,14 @@ def test_define_travis_tasks @hoe.define_travis_tasks travis = Rake::Task['travis'] - assert_equal %w[test], travis.prerequisites + assert_equal %w[test check_manifest], travis.prerequisites after = Rake::Task['travis:after'] - assert_equal %w[travis:fake_config check_manifest], after.prerequisites + assert_equal %w[travis:fake_config], after.prerequisites before = Rake::Task['travis:before'] assert_equal %w[install_plugins check_extra_deps], before.prerequisites check = Rake::Task['travis:check'] @@ -130,11 +132,11 @@ end def test_travis_versions def @hoe.have_gem?(name) false end - assert_equal %w[1.8.7 1.9.2 1.9.3], @hoe.travis_versions + assert_equal %w[2.1.0 2.2.0 2.3.0], @hoe.travis_versions end def test_travis_versions_multiruby def @hoe.have_gem?(name) true end def @hoe.`(command) "Passed: 1.6.8, 1.8.0" end @@ -152,26 +154,26 @@ def @hoe.have_gem?(name) true end Dir.mktmpdir do |path| ENV['HOME'] = path - assert_equal %w[1.8.7 1.9.2 1.9.3], @hoe.travis_versions + assert_equal %w[2.1.0 2.2.0 2.3.0], @hoe.travis_versions end end def test_travis_yml_check Tempfile.open 'travis' do |io| - io.write "---\nlanguage: ruby\nrvm:\n - 1.8.7\n" + io.write "---\nlanguage: ruby\nrvm:\n - 2.1.0\n" io.rewind assert @hoe.travis_yml_check io.path end end def test_travis_yml_check_invalid Tempfile.open 'travis' do |io| - io.write "---\nlanguage: ruby\n" + io.write "---\nlangage: ruby\n" io.rewind out, err = capture_io do refute @hoe.travis_yml_check io.path end @@ -184,17 +186,17 @@ def test_travis_yml_edit Tempfile.open 'out' do |out_io| ENV['EDITOR'] = "cat > #{out_io.path} < " Tempfile.open 'travis' do |io| - io.write "---\nlanguage: ruby\nrvm:\n - 1.8.7\n" + io.write "---\nlanguage: ruby\nrvm:\n - 2.1.0\n" io.rewind @hoe.travis_yml_edit io.path end - assert_equal "---\nlanguage: ruby\nrvm:\n - 1.8.7\n", out_io.read + assert_equal "---\nlanguage: ruby\nrvm:\n - 2.1.0\n", out_io.read end end def test_travis_yml_edit_bad ENV['EDITOR'] = "cat > /dev/null < " @@ -230,13 +232,13 @@ language: ruby notifications: email: - email@example rvm: -- 1.8.7 -- 1.9.2 -- 1.9.3 +- 2.1.0 +- 2.2.0 +- 2.3.0 script: rake travis TRAVIS_YML assert_equal expected, travis_yml end @@ -256,6 +258,5 @@ end end end end -