Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improved tests

  • Loading branch information...
commit 4c0a1fb0038a4ad47818a893f16bfdeee8e0a6bd 1 parent f8d0c38
Phil Hagelberg authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 test/test_conspire.rb
9 test/test_conspire.rb
View
@@ -30,6 +30,8 @@ def setup
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"`
end
def teardown
@@ -42,16 +44,21 @@ 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
+ Conspire.discover 1
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.