spec/integration/ruby_spec.rb in vx-builder-0.5.23 vs spec/integration/ruby_spec.rb in vx-builder-0.5.24

- old
+ new

@@ -12,21 +12,19 @@ end after { FileUtils.rm_rf(path) } def write_script_to_filter(prefix, script) -=begin File.open(fixture_path("integration/ruby/#{prefix}before_script.sh"), 'w') do |io| io << script.to_before_script end File.open(fixture_path("integration/ruby/#{prefix}after_script.sh"), 'w') do |io| io << script.to_after_script end File.open(fixture_path("integration/ruby/#{prefix}script.sh"), 'w') do |io| io << script.to_script end -=end end def build(file, options = {}) config = file ? Vx::Builder::BuildConfiguration.from_yaml(file) : Vx::Builder::BuildConfiguration.new(nil) matrix = Vx::Builder.matrix config @@ -113,12 +111,12 @@ system("env", "-", "USER=$USER", "HOME=#{path}", "bash", "script.sh" ) expect($?.to_i).to eq 0 end end - it "should succesfuly run lang/ruby with parallel_rspec", real: true do - file = {"language" => "ruby", "parallel" => 3, "script" => "parallel_rspec"}.to_yaml + it "should succesfuly run lang/ruby with rvm key", real: true do + file = {"rvm" => "2.1"}.to_yaml task = create( :task, sha: "HEAD", branch: "lang/ruby" ) @@ -133,18 +131,19 @@ system("env", "-", "USER=$USER", "HOME=#{path}", "bash", "script.sh" ) expect($?.to_i).to eq 0 end end - it "should succesfuly run lang/ruby with auto build", real: true do + it "should succesfuly run lang/ruby with parallel_rspec", real: true do + file = {"language" => "ruby", "parallel" => 3, "script" => "parallel_rspec"}.to_yaml task = create( :task, sha: "HEAD", branch: "lang/ruby" ) - b = build(nil, task: task) + b = build(file, task: task) Dir.chdir(path) do File.open("script.sh", "w") do |io| io.write "set -e\n" io.write b.scripts[0].to_before_script io.write b.scripts[0].to_script @@ -152,18 +151,19 @@ system("env", "-", "USER=$USER", "HOME=#{path}", "bash", "script.sh" ) expect($?.to_i).to eq 0 end end - it "should succesfuly run lang/ruby-rails-pg with auto build", real: true do + it "should succesfuly run lang/ruby-rails-pg", real: true do + file = {"language" => "ruby"}.to_yaml task = create( :task, sha: "HEAD", branch: "lang/ruby-rails-pg" ) - b = build(nil, task: task) + b = build(file, task: task) Dir.chdir(path) do File.open("script.sh", "w") do |io| io.write "set -e\n" io.write b.scripts[0].to_before_script io.write b.scripts[0].to_script @@ -171,17 +171,18 @@ system("env", "-", "USER=$USER", "HOME=#{path}", "bash", "script.sh" ) expect($?.to_i).to eq 0 end end - it "should succesfuly run lang/ruby-rails-mysql with auto build", real: true do + it "should succesfuly run lang/ruby-rails-mysql", real: true do + file = {"language" => "ruby"}.to_yaml task = create( :task, sha: "HEAD", branch: "lang/ruby-rails-mysql" ) - b = build(nil, task: task) + b = build(file, task: task) Dir.chdir(path) do File.open("script.sh", "w") do |io| io.write "set -e\n" io.write b.scripts[0].to_before_script io.write b.scripts[0].to_script