Sha256: 3099784e831a73d576b3b2d4334d82336b5df763c6a8c87e9d1befa2b6990f76

Contents?: true

Size: 836 Bytes

Versions: 3

Compression:

Stored size: 836 Bytes

Contents

require 'teststrap'
require 'contributions/git'

context "Contributions::Git" do
  context ".contributions" do
    context 'determines all the user\'s contributions' do
      setup { Contributions::Git.contributions('Charlie Tanksley', 'thumblemonks/riot') }

      asserts_topic.size 6
    end
  end

  context ".clone creates a clone and runs the block you pass it" do
    helper(:command) { "git log --author='Charlie Tanksley' --format='%h %ci %s %b' --no-color" }
    setup do
      Contributions::Git.clone('thumblemonks/riot') { IO.popen(command) { |io| io.readlines } }
    end

    asserts_topic.size 6
  end

  context ".log_format" do
    setup { Contributions::Git.log_format }

    asserts_topic.equals "%h CONTRIBUTIONS_SEPARATOR %ci CONTRIBUTIONS_SEPARATOR %s CONTRIBUTIONS_SEPARATOR %b CONTRIBUTIONS_ENDING "
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
contributions-0.2.0 test/git_test.rb
contributions-0.1.2 test/git_test.rb
contributions-0.1.1 test/git_test.rb