Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

extract common ruby tests between 1.8.7 and 1.9

  • Loading branch information...
commit 1eff8d914cd7a31f301867ee62b46455cc7bbff2 1 parent 0e15a25
David Sabeti and Dmitriy Kalinin authored
Showing with 9 additions and 22 deletions.
  1. +9 −22 spec/apps/ruby_spec.rb
View
31 spec/apps/ruby_spec.rb
@@ -5,12 +5,10 @@
describe "Ruby" do
before(:all) { @session = BVT::Harness::CFSession.new }
- describe "ruby 1.8" do
- with_app "ruby18"
-
+ def self.it_supports_basics(version)
it "starts the app successfully" do
res = app.get_response(:get, "/ruby_version")
- res.to_str.should == "1.8.7"
+ res.to_str.should start_with(version)
end
it "supports git gems" do
@@ -19,32 +17,21 @@
end
end
- it "installs 1.8 native extensions" do
+ it "installs native extensions" do
app.file("logs/staging_task.log").tap do |log|
log.should include "Installing ffi"
end
end
end
+ describe "ruby 1.8" do
+ with_app "ruby18"
+ it_supports_basics "1.8.7"
+ end
+
describe "ruby 1.9" do
with_app "ruby19"
-
- it "starts the app successfully" do
- res = app.get_response(:get, "/ruby_version")
- res.to_str.should start_with("1.9")
- end
-
- it "supports git gems" do
- app.file("logs/staging_task.log").tap do |log|
- log.should match %r{Using cf .* git://github.com/cloudfoundry/cf.git}
- end
- end
-
- it "installs 1.9 native extensions" do
- app.file("logs/staging_task.log").tap do |log|
- log.should include "Installing ffi"
- end
- end
+ it_supports_basics "1.9"
end
describe "rails" do
Please sign in to comment.
Something went wrong with that request. Please try again.