Sha256: cbd4c2bc4cf7830f1917d4d9aea38bd19ff51fceb54cb6a83b8cd910467897bc
Contents?: true
Size: 1.2 KB
Versions: 15
Compression:
Stored size: 1.2 KB
Contents
require File.dirname(__FILE__) + '/../integration_helper' describe "Updating a mirror without conflicts" do before do FileUtils.rm_rf(TMP_PATH) FileUtils.mkdir_p(TMP_PATH) end describe "from a git repository" do before do @shiny = create_git_repo_from_fixture("shiny") @skit1 = create_git_repo_from_fixture("skit1") in_dir(@shiny) do `#{BRAID_BIN} add #{@skit1}` end update_dir_from_fixture("skit1", "skit1.1") in_dir(@skit1) do `git add *` `git commit -m "change default color"` end update_dir_from_fixture("skit1", "skit1.2") in_dir(@skit1) do `git add *` `git commit -m "add a happy note"` end end it "should add the files and commit" do in_dir(@shiny) do `#{BRAID_BIN} update skit1` end file_name = "layouts/layout.liquid" output = `diff -U 3 #{File.join(FIXTURE_PATH, "skit1.2", file_name)} #{File.join(TMP_PATH, "shiny", "skit1", file_name)}` $?.should be_success output = `git log --pretty=oneline`.split("\n") output.length.should == 3 output[0].should =~ /Braid: Update mirror 'skit1' to '[0-9a-f]{7}'/ end end end
Version data entries
15 entries across 15 versions & 2 rubygems