Hi,
Only small changes here:
First one allowing "require 'deltacloud'" in 'server' directory, which could be usefull for testing in some cases.
Second one removes 'rcov' from 'features' cucumber task and create new one called 'rcov'. So for code coverage reports you can call 'rake rcov'
Michal
--- server/Rakefile | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/server/Rakefile b/server/Rakefile index 34faa6a..2749574 100644 --- a/server/Rakefile +++ b/server/Rakefile @@ -39,7 +39,11 @@ Rake::TestTask.new("test") { |t|
Cucumber::Rake::Task.new(:features) do |t| + t.cucumber_opts = "features --format html --out cucumber.html" + t.rcov = false +end + +Cucumber::Rake::Task.new(:rcov) do |t| t.cucumber_opts = "features --format pretty" t.rcov = true end -
--- server/deltacloud.rb | 2 -- server/server.rb | 1 + 2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/server/deltacloud.rb b/server/deltacloud.rb index a9dd67d..c879316 100644 --- a/server/deltacloud.rb +++ b/server/deltacloud.rb @@ -12,5 +12,3 @@ require 'deltacloud/models/image' require 'deltacloud/models/instance' require 'deltacloud/models/storage_snapshot' require 'deltacloud/models/storage_volume' - -require 'deltacloud/helpers' diff --git a/server/server.rb b/server/server.rb index 3e5ee07..ce5bc43 100644 --- a/server/server.rb +++ b/server/server.rb @@ -11,6 +11,7 @@ require 'sinatra/static_assets' require 'sinatra/rabbit' require 'sinatra/lazy_auth' require 'deltacloud/validation' +require 'deltacloud/helpers'
configure do set :raise_errors => false
On Tue, 2010-03-16 at 15:48 +0100, mfojtik@redhat.com wrote:
server/Rakefile | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/server/Rakefile b/server/Rakefile index 34faa6a..2749574 100644 --- a/server/Rakefile +++ b/server/Rakefile @@ -39,7 +39,11 @@ Rake::TestTask.new("test") { |t|
Cucumber::Rake::Task.new(:features) do |t|
- t.cucumber_opts = "features --format html --out cucumber.html"
- t.rcov = false
+end
One small nit: can we put test output, reports, etc. into server/tmp so that we don't clutter the toplevel ?
David
On Tue, 2010-03-16 at 15:48 +0100, mfojtik@redhat.com wrote:
First one allowing "require 'deltacloud'" in 'server' directory, which could be usefull for testing in some cases.
Second one removes 'rcov' from 'features' cucumber task and create new one called 'rcov'. So for code coverage reports you can call 'rake rcov'
These two additions are fine, though the underlying cucmber tests still fail for me.
I looked a little more into this; it seems the issues I am having are * There was a small typo in env.rb * The server started with a root directory somewhere inside the polyglot gem's install dir, and could therefore not find its views * The server responds with HTML, even though the Accept header is set to application/xml (that works with a non-test server)
Attached is a small patch for the first two issues; haven't been able to track down why the server responds with HTML.
David
deltacloud-devel@lists.fedorahosted.org