This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

minor test fix

  • Loading branch information...
technomancy committed Jul 24, 2008
1 parent 4c0a1fb commit 261edde4304b4e543da55cc67c9faee1abf3b335
Showing with 4 additions and 10 deletions.
  1. +1 −1 lib/conspire/conspirator.rb
  2. +3 −9 test/test_conspire.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
@@ -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

0 comments on commit 261edde

Please sign in to comment.