Sha256: c415c2416412dd98a5586dc709207a2ab7a65532d9632392b9de509c0c525814

Contents?: true

Size: 791 Bytes

Versions: 6

Compression:

Stored size: 791 Bytes

Contents

require "test_helper"
require "rubycritic/source_control_systems/source_control_system"

describe Rubycritic::SourceControlSystem do
  before do
    Rubycritic::SourceControlSystem.systems.each do |system|
      system.stubs(:supported?).returns(false)
    end
  end

  describe "::create" do
    describe "when a source control system is found" do
      it "creates an instance of that source control system" do
        Rubycritic::Git.stubs(:supported?).returns(true)
        system = Rubycritic::SourceControlSystem.create
        system.must_be_instance_of Rubycritic::Git
      end
    end

    describe "when no source control system is found" do
      it "raises an error" do
        proc { Rubycritic::SourceControlSystem.create }.must_raise RuntimeError
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubycritic-0.0.7 test/lib/rubycritic/source_control_systems/source_control_system_test.rb
rubycritic-0.0.6 test/lib/rubycritic/source_control_systems/source_control_system_test.rb
rubycritic-0.0.5 test/lib/rubycritic/source_control_systems/source_control_system_test.rb
rubycritic-0.0.4 test/lib/rubycritic/source_control_systems/source_control_system_test.rb
rubycritic-0.0.3 test/lib/rubycritic/source_control_systems/source_control_system_test.rb
rubycritic-0.0.2 test/lib/rubycritic/source_control_systems/source_control_system_test.rb