Sha256: 6e76011a89c09af3528cd970646aab135f14f3b7bfe0ea54d5c0ba6fdc951dc8

Contents?: true

Size: 904 Bytes

Versions: 10

Compression:

Stored size: 904 Bytes

Contents

require 'test_helper'

class TestGemspecHelper < Test::Unit::TestCase
  def setup
    Rake.application.instance_variable_set(:@rakefile, 'Rakefile')
  end

  context 'given a gemspec' do
    setup do
      @spec = build_spec
      @helper = Jeweler::GemSpecHelper.new(@spec, File.dirname(__FILE__))
    end

    should 'have sane gemspec path' do
      assert_equal "test/jeweler/#{@spec.name}.gemspec", @helper.path
    end
  end

  context '#write' do
    setup do
      @spec = build_spec
      @helper = Jeweler::GemSpecHelper.new(@spec, File.dirname(__FILE__))
      FileUtils.rm_f(@helper.path)

      @helper.write
    end

    teardown do
      FileUtils.rm_f(@helper.path)
    end

    should 'create gemspec file' do
      assert File.exist?(@helper.path)
    end

    should 'make valid spec' do
      assert @helper.valid?
    end

    should 'parse' do
      @helper.parse
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jeweler-2.3.9 test/jeweler/test_gemspec_helper.rb
jeweler-2.3.7 test/jeweler/test_gemspec_helper.rb
jeweler-2.3.6 test/jeweler/test_gemspec_helper.rb
jeweler-2.3.5 test/jeweler/test_gemspec_helper.rb
jeweler-2.3.3 test/jeweler/test_gemspec_helper.rb
jeweler-2.3.2 test/jeweler/test_gemspec_helper.rb
jeweler-2.3.1 test/jeweler/test_gemspec_helper.rb
jeweler-2.3.0 test/jeweler/test_gemspec_helper.rb
jeweler-2.2.1 test/jeweler/test_gemspec_helper.rb
jeweler-2.1.2 test/jeweler/test_gemspec_helper.rb