Permalink
Browse files

Merge "fix marketplace unit test"

  • Loading branch information...
2 parents 2109e63 + 60dc168 commit 838fb94b809e4c4876cee3bbbfe441574e1ebbfb @SlimYang SlimYang committed with Gerrit Code Review Jan 6, 2013
View
@@ -25,7 +25,7 @@ This AppDirect Gateway acts as a proxy between the Cloud Controller and App Dire
``` bash
$ bundle install
-$ rspec spec
+$ rake spec
```
@@ -27,6 +27,7 @@ def initialize(opts)
testservice = {
"id" => "testservice",
"version" => "1.0",
+ "label" => "testservice-1.0",
"name" => "My Test Service",
"description" => "My test Service",
"plans" => [ "D100", "free" ],
@@ -50,6 +51,7 @@ def set_config(key, value)
fooservice = {
"id" => "fooservice",
"version" => "1.0",
+ "label" => "fooservice-1.0",
"name" => "Foo Service",
"description" => "Foo Service",
"plans" => [ "free" ],
@@ -12,13 +12,15 @@ require 'ci/reporter/rake/rspec'
require "simplecov"
require "simplecov-rcov"
+include Rake::DSL
+
coverage_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_coverage"))
reports_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_reports"))
ENV['CI_REPORTS'] = reports_dir
desc "Run specs using RCov"
-task "spec:ci" => ["ci:setup:rspec", "simcov"]
+task "spec:ci" => ["simcov"]
RSpec::Core::RakeTask.new do |t|
t.pattern = "**/*_spec.rb"
@@ -38,9 +40,7 @@ task "simcov" => "cleanup_coverage" do
SimpleCov.coverage_dir('spec_coverage')
SimpleCov.start do
add_filter "/spec/"
- spec_dir = File.expand_path("..", __FILE__)
- Rspec::Core::Runner.disable_autorun!
- Rspec::Core::Runner.run([spec_dir], STDERR, STDOUT)
+ sh "rake ci:setup:rspec spec"
end
end
@@ -8,17 +8,6 @@
require "bundler"
Bundler.require(:default, :test)
-require "simplecov"
-require "simplecov-rcov"
-class SimpleCov::Formatter::MergedFormatter
- def format(result)
- SimpleCov::Formatter::HTMLFormatter.new.format(result)
- SimpleCov::Formatter::RcovFormatter.new.format(result)
- end
-end
-SimpleCov.formatter = SimpleCov::Formatter::MergedFormatter
-SimpleCov.start
-
require "rspec"
require "bundler/setup"
require "json"

0 comments on commit 838fb94

Please sign in to comment.