Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor test fix

  • Loading branch information...
commit 261edde4304b4e543da55cc67c9faee1abf3b335 1 parent 4c0a1fb
@technomancy authored
Showing with 4 additions and 10 deletions.
  1. +1 −1  lib/conspire/conspirator.rb
  2. +3 −9 test/test_conspire.rb
View
2  lib/conspire/conspirator.rb
@@ -12,7 +12,7 @@ def sync(path)
puts "cd #{path} && git pull --rebase #{url}"
system "cd #{path} && git pull --rebase #{url}"
else
- system "cd #{path} && git pull --rebase #{url} > /dev/null"
+ system "cd #{path} && git pull --rebase #{url} &> /dev/null"
end
raise "could not rebase from #{url}" if ! success
View
12 test/test_conspire.rb
@@ -29,9 +29,8 @@ def setup
Gitjour::Application.serve(REMOTE_SPACE, 'conspiracy-remote-test', 7458)
end
- Conspire.start(LOCAL_SPACE, OpenStruct.new(:port => 7457))
- File.open(LOCAL_SPACE + '/file2', 'w') { |f| f.puts "hello world!" }
- `cd #{LOCAL_SPACE}; git add file2; git commit -m "conspire"`
+ Conspire.start(LOCAL_SPACE, OpenStruct.new(:port => 7457,
+ :name => 'conspiracy'))
end
def teardown
@@ -44,21 +43,16 @@ def teardown
def test_start
assert File.exist?(LOCAL_SPACE + '/.git')
- assert(system("cd #{LOCAL_SPACE} && git pull --rebase git://localhost:7458/"),
- "Could not rebase from remote.")
end
def test_discover
- Conspire.discover 1
+ Conspire.discover
assert_equal [7458], Conspire.conspirators.map{ |c| c.port }
end
def test_sync
Conspire.conspirators << Conspire::Conspirator.new('localhost.', '7458')
Conspire.sync_all
-
- assert Conspire.conspirators.last, "Dropped remote conspirator"
- assert_equal 'localhost', Conspire.conspirators.last.host
assert_equal ["#{LOCAL_SPACE}/file"], Dir.glob("#{LOCAL_SPACE}/*")
end
Please sign in to comment.
Something went wrong with that request. Please try again.