Sha256: dcdb8cb58887ae00ebbcfbcac1ef5d433c8864108be827867543cdc07321cb1c

Contents?: true

Size: 1.12 KB

Versions: 114

Compression:

Stored size: 1.12 KB

Contents

require 'test_helper'

require 'rake'
class TestTasks < Test::Unit::TestCase
  include Rake

  context 'instantiating Jeweler::Tasks' do
    setup do
      @gemspec_building_block = lambda {|gemspec|}
      @tasks = Jeweler::Tasks.new &@gemspec_building_block
    end

    teardown do
      Task.clear
    end

    should 'assign @gemspec' do
      assert_not_nil @tasks.gemspec
    end

    should 'not eagerly initialize Jeweler' do
      assert ! @tasks.instance_variable_defined?(:@jeweler)
    end

    should 'set self as the application-wide jeweler tasks' do
      assert_same @tasks, Rake.application.jeweler_tasks
    end

    should 'save gemspec building block for later' do
      assert_same @gemspec_building_block, @tasks.gemspec_building_block
    end

    context 'Jeweler instance' do
      setup do
        @tasks.jeweler
      end

      should 'initailize Jeweler' do
        assert @tasks.instance_variable_defined?(:@jeweler)
      end
    end

    should 'yield the gemspec instance' do
      spec = nil
      @tasks = Jeweler::Tasks.new { |s| spec = s }
      assert_not_nil @tasks.jeweler.gemspec
    end

  end
end

Version data entries

114 entries across 60 versions & 6 rubygems

Version Path
jeweler-2.1.1 test/jeweler/test_tasks.rb
jeweler-2.0.1 test/jeweler/test_tasks.rb
jeweler-2.0.0 test/jeweler/test_tasks.rb
jeweler-1.8.8 test/jeweler/test_tasks.rb
jeweler-1.8.7 test/jeweler/test_tasks.rb
jeweler-1.8.6 test/jeweler/test_tasks.rb
jeweler-1.8.5 test/jeweler/test_tasks.rb
devise_sociable-0.1.0 vendor/bundle/gems/jeweler-1.8.4/test/jeweler/test_tasks.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/test/jeweler/test_tasks.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/test/jeweler/test_tasks.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/test/jeweler/test_tasks.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/test/jeweler/test_tasks.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/test/jeweler/test_tasks.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/test/jeweler/test_tasks.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/test/jeweler/test_tasks.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/test/jeweler/test_tasks.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/test/jeweler/test_tasks.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/test/jeweler/test_tasks.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/jeweler-1.5.2/test/jeweler/test_tasks.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/jeweler-1.6.4/test/jeweler/test_tasks.rb