Sha256: cf5bc3d32ab34e546910ac693eda69615809dff1136c9e468eb139b22511ef9d

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

require 'test_helper'

class Jeweler
  module Commands
    class TestReleaseToRubygems < Test::Unit::TestCase
      def self.subject
        Jeweler::Commands::ReleaseToRubygems.new
      end

      gemcutter_command_context 'rubyforge_project is defined in gemspec and package exists on rubyforge' do
        setup do
          stub(@gemspec_helper).gem_path { 'pkg/zomg-1.2.3.gem' }
          stub(@command).sh
          @command.run
        end

        should 'push to rubygems' do
          push_command = "gem push #{@gemspec_helper.gem_path}"
          assert_received(@command) { |command| command.sh(push_command) }
        end
      end

      build_command_context 'build for jeweler' do
        setup do
          @command = Jeweler::Commands::ReleaseToRubygems.build_for(@jeweler)
        end

        should 'assign gemspec helper' do
          assert_equal @gemspec_helper, @command.gemspec_helper
        end

        should 'assign output' do
          assert_equal @output, @command.output
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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