Sha256: 5d2764f2d0ed66d532940c6e2f907aa22736afe620754af165519098a7ff2c12
Contents?: true
Size: 1.29 KB
Versions: 5
Compression:
Stored size: 1.29 KB
Contents
require File.expand_path("../../spec_helper", __FILE__) describe CukeQ::Scm do def scm(vcs, mock_bridge = false) scm = case vcs when :git CukeQ::Scm.new("git://github.com/jarib/cukeq.git") when :svn CukeQ::Scm.new("svn://example.com/somerepo/trunk") else raise "unknown vcs: #{vcs.inspect}" end if mock_bridge scm.instance_variable_set("@bridge", mock("scm-bridge")) end scm end it "replaces special characters in the working copy dir" do scm(:git).working_copy.should_not =~ /[^A-z_\/.]/ end it "creates the correct bridge" do scm(:git).bridge.should be_kind_of(CukeQ::Scm::GitBridge) scm(:svn).bridge.should be_kind_of(CukeQ::Scm::SvnBridge) end it "understands http urls" do CukeQ::Scm.new("http://github.com/foo/bar.git").bridge.should be_kind_of(CukeQ::Scm::GitBridge) CukeQ::Scm.new("https://svn.example.com/foo/bar").bridge.should be_kind_of(CukeQ::Scm::SvnBridge) end it "forwards update() to the bridge" do scm = scm(:git, true) scm.bridge.should_receive(:update).and_yield scm.update {} end it "forwards current_revision() to the bridge" do scm = scm(:git, true) scm.bridge.should_receive(:current_revision) scm.current_revision end end
Version data entries
5 entries across 5 versions & 1 rubygems