testbot 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/README.markdown +1 -1
- data/lib/runner/runner.rb +1 -1
- data/lib/shared/version.rb +1 -1
- metadata +4 -5
- data/test/runner/runner_test.rb +0 -51
data/CHANGELOG
CHANGED
data/README.markdown
CHANGED
@@ -67,7 +67,7 @@ Using testbot with Rails 2:
|
|
67
67
|
|
68
68
|
# Add testbot to your Gemfile if you use bundler. You also need the plugin because
|
69
69
|
# Rails 2 does not load raketasks from gems.
|
70
|
-
ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.7.
|
70
|
+
ruby script/plugin install git://github.com/joakimk/testbot.git -r 'refs/tags/v0.7.1'
|
71
71
|
script/generate testbot --connect 192.168.0.100
|
72
72
|
|
73
73
|
rake testbot:spec (or :rspec, :test, :features)
|
data/lib/runner/runner.rb
CHANGED
@@ -128,7 +128,7 @@ module Testbot::Runner
|
|
128
128
|
def before_run(job)
|
129
129
|
rvm_prefix = RubyEnv.rvm_prefix(job.project)
|
130
130
|
bundler_cmd = (RubyEnv.bundler?(job.project) ? [rvm_prefix, "bundle &&", rvm_prefix, "bundle exec"] : [rvm_prefix]).compact.join(" ")
|
131
|
-
command_prefix = "cd #{job.project}
|
131
|
+
command_prefix = "cd #{job.project} && export RAILS_ENV=test && export TEST_INSTANCES=#{@config.max_instances} && #{bundler_cmd}"
|
132
132
|
|
133
133
|
if File.exists?("#{job.project}/lib/tasks/testbot.rake")
|
134
134
|
system "#{command_prefix} rake testbot:before_run"
|
data/lib/shared/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Testbot
|
2
2
|
# Don't forget to update readme and changelog
|
3
3
|
def self.version
|
4
|
-
version = "0.7.
|
4
|
+
version = "0.7.1"
|
5
5
|
dev_version_file = File.join(File.dirname(__FILE__), '..', '..', 'DEV_VERSION')
|
6
6
|
if File.exists?(dev_version_file)
|
7
7
|
version += File.read(dev_version_file)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Joakim Kolsj\xC3\xB6"
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-11-
|
18
|
+
date: 2012-11-22 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -295,7 +295,6 @@ files:
|
|
295
295
|
- test/requester/testbot.yml
|
296
296
|
- test/requester/testbot_with_erb.yml
|
297
297
|
- test/runner/job_test.rb
|
298
|
-
- test/runner/runner_test.rb
|
299
298
|
- test/runner/safe_result_text_test.rb
|
300
299
|
- test/server/group_test.rb
|
301
300
|
- test/server/server_test.rb
|
data/test/runner/runner_test.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
require File.expand_path(File.join(File.dirname(__FILE__), '../../lib/shared/testbot.rb'))
|
2
|
-
require File.expand_path(File.join(File.dirname(__FILE__), '../../lib/runner/runner.rb'))
|
3
|
-
require 'test/unit'
|
4
|
-
require 'shoulda'
|
5
|
-
require 'flexmock/test_unit'
|
6
|
-
|
7
|
-
module Testbot::Runner
|
8
|
-
|
9
|
-
class RunnerTest < Test::Unit::TestCase
|
10
|
-
should "use bundle exec in when calling rake testbot:before_run if bundler is present" do
|
11
|
-
job = flexmock(:job, :project => "/path")
|
12
|
-
flexmock(RubyEnv).should_receive(:bundler?).with("/path").returns(true)
|
13
|
-
flexmock(RubyEnv).should_receive(:rvm?).returns(false)
|
14
|
-
|
15
|
-
runner = Runner.new({:max_instances => 1})
|
16
|
-
flexmock(File).should_receive(:exists?).with("/path/lib/tasks/testbot.rake").and_return(true)
|
17
|
-
flexmock(File).should_receive(:exists?).with("/path/config/testbot/before_run.rb").and_return(false)
|
18
|
-
flexmock(File).should_receive(:exists?).with("/path/.rvmrc").and_return(false)
|
19
|
-
flexmock(runner)
|
20
|
-
flexmock(runner).should_receive(:system).with("cd /path; RAILS_ENV=test TEST_INSTANCES=1 bundle && bundle exec rake testbot:before_run").once
|
21
|
-
runner.send(:before_run, job)
|
22
|
-
end
|
23
|
-
|
24
|
-
should "be able to use a plain ruby before_run file" do
|
25
|
-
job = flexmock(:job, :project => "/path")
|
26
|
-
flexmock(RubyEnv).should_receive(:bundler?).with("/path").returns(true)
|
27
|
-
flexmock(RubyEnv).should_receive(:rvm?).returns(false)
|
28
|
-
|
29
|
-
runner = Runner.new({:max_instances => 1})
|
30
|
-
flexmock(File).should_receive(:exists?).with("/path/lib/tasks/testbot.rake").and_return(false)
|
31
|
-
flexmock(File).should_receive(:exists?).with("/path/config/testbot/before_run.rb").and_return(true)
|
32
|
-
flexmock(runner)
|
33
|
-
flexmock(runner).should_receive(:system).with("cd /path; RAILS_ENV=test TEST_INSTANCES=1 bundle && bundle exec ruby config/testbot/before_run.rb").once
|
34
|
-
runner.send(:before_run, job)
|
35
|
-
end
|
36
|
-
|
37
|
-
should "be able to run without bundler" do
|
38
|
-
job = flexmock(:job, :project => "/path")
|
39
|
-
flexmock(RubyEnv).should_receive(:bundler?).with("/path").returns(false)
|
40
|
-
flexmock(RubyEnv).should_receive(:rvm?).returns(false)
|
41
|
-
|
42
|
-
runner = Runner.new({:max_instances => 1})
|
43
|
-
flexmock(File).should_receive(:exists?).with("/path/lib/tasks/testbot.rake").and_return(false)
|
44
|
-
flexmock(File).should_receive(:exists?).with("/path/config/testbot/before_run.rb").and_return(true)
|
45
|
-
flexmock(runner)
|
46
|
-
flexmock(runner).should_receive(:system).with("cd /path; RAILS_ENV=test TEST_INSTANCES=1 ruby config/testbot/before_run.rb").once
|
47
|
-
runner.send(:before_run, job)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|