On 23/09/10 18:57 +0100, [email protected] wrote:
From: marios <[email protected]>
---
server/lib/sinatra/respond_to.rb | 39 +++++++------------------------------
1 files changed, 8 insertions(+), 31 deletions(-)
diff --git a/server/lib/sinatra/respond_to.rb b/server/lib/sinatra/respond_to.rb
index f88c025..926b10d 100644
--- a/server/lib/sinatra/respond_to.rb
+++ b/server/lib/sinatra/respond_to.rb
@@ -30,38 +30,15 @@ module Sinatra
app.set :default_content, :html
app.set :assume_xhr_is_js, true
- # We remove the trailing extension so routes
- # don't have to be of the style
- #
- # get '/resouce.:format'
- #
- # They can instead be of the style
- #
- # get '/resource'
- #
- # and the format will automatically be available in <tt>format</tt>
+ #deltacloud: removed the code that tried to 'guess' content based on
extension
+ #as this broke blobstore api (stripping blob names). Use ?format if present, otherwise
+ #use http accept, otherwise set to default
app.before do
- # Let through sinatra image urls in development
- next if self.class.development? && request.path_info =~
%r{/__sinatra__/.*?.png}
-
- unless options.static? && options.public? && (request.get? || request.head?)
&& static_file?(request.path_info)
- rpi = request.path_info.sub(%r{\.([^\./]+)$}, '')
-
- if (not $1) or ($1 and TEXT_MIME_TYPES.include?($1.to_sym))
- request.path_info, ext = rpi, nil
- if ! $1.nil?
- ext = $1
- elsif env['HTTP_ACCEPT'].nil? || env['HTTP_ACCEPT'].empty?
- ext = options.default_content
- end
- if ext
- @mime_types = [ Helpers::mime_type(ext) ]
- format ext
- elsif (params[:format])
- @mime_types = [Helpers::mime_type(params[:format])]
- format params[:format]
- end
- end
+ if (params[:format])
+ @mime_types = [Helpers::mime_type(params[:format])]
+ format params[:format]
+ elsif env['HTTP_ACCEPT'].nil? || env['HTTP_ACCEPT'].empty?
+ ext = options.default_content
end
end
--
1.7.2.3
Actually, I need to NACK this patch because lot of our specs are failing
with this code. See attached output of 'rake test':
Btw. after quick look on failed tests I think we will need update our
tests to omit usage of '.format' and switch to '?format' instead.
Also please run:
cd core/tests
rake cucumber
API_DRIVER="ec2" rake cucumber
before this patch will be pushed. There are also some failures.
-- Michal
--
--------------------------------------------------------
Michal Fojtik, [email protected]
Deltacloud API: http://deltacloud.org
--------------------------------------------------------
/usr/bin/ruby -I"lib"
"/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
"tests/api_test.rb" "tests/hardware_profiles_test.rb" "tests/realms_test.rb"
"tests/images_test.rb" "tests/instances_test.rb"
"tests/instance_states_test.rb" "tests/url_for_test.rb"
(in /home/mfojtik/code/core/server)
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.FFF....FF......FE.FFE.EFFFF...FEFFEEEE....FEFFFFF.....
Finished in 0.087031 seconds.
1) Failure:
test_it_responses_to_html(DeltacloudUnitTest::ApiTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/api_test.rb:25:in `test_it_responses_to_html']:
expected: 200,
got: 404 (using ==)
2) Failure:
test_it_responses_to_json(DeltacloudUnitTest::ApiTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/api_test.rb:31:in `test_it_responses_to_json']:
expected: 200,
got: 404 (using ==)
3) Failure:
test_it_returns_entry_points(DeltacloudUnitTest::ApiTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/api_test.rb:13:in `test_it_returns_entry_points']:
expected: > 0,
got: 0
4) Failure:
test_it_can_filter_using_architecture(DeltacloudUnitTest::HardwareProfilesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/images_test.rb:71:in `test_it_can_filter_using_architecture']:
expected: 1,
got: 0 (using ==)
5) Failure:
test_it_can_filter_using_owner_id(DeltacloudUnitTest::HardwareProfilesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/images_test.rb:60:in `test_it_can_filter_using_owner_id']:
expected: 1,
got: 0 (using ==)
6) Failure:
test_it_responses_to_html(DeltacloudUnitTest::HardwareProfilesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/images_test.rb:93:in `test_it_responses_to_html']:
expected: 200,
got: 404 (using ==)
7) Error:
test_it_responses_to_json(DeltacloudUnitTest::HardwareProfilesTest):
JSON::ParserError: 705: unexpected token at '<h1>Not Found</h1>'
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
./tests/images_test.rb:82:in `test_it_responses_to_json'
8) Failure:
test_it_returns_hardware_profiles(DeltacloudUnitTest::HardwareProfilesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/hardware_profiles_test.rb:13:in
`test_it_returns_hardware_profiles']:
expected: > 0,
got: 0
9) Failure:
test_it_returns_images(DeltacloudUnitTest::HardwareProfilesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/images_test.rb:17:in `test_it_returns_images']:
expected: > 0,
got: 0
10) Error:
test_it_returns_valid_hardware_profile(DeltacloudUnitTest::HardwareProfilesTest):
NoMethodError: undefined method `[]' for nil:NilClass
./tests/hardware_profiles_test.rb:98:in `test_profile_properties'
./tests/hardware_profiles_test.rb:57:in
`test_it_returns_valid_hardware_profile'
11) Error:
test_m1_xlarge_profile_has_correct_attributes(DeltacloudUnitTest::HardwareProfilesTest):
NoMethodError: undefined method `[]' for nil:NilClass
./tests/hardware_profiles_test.rb:98:in `test_profile_properties'
./tests/hardware_profiles_test.rb:51:in
`test_m1_xlarge_profile_has_correct_attributes'
12) Failure:
test_inst1_has_correct_attributes(DeltacloudUnitTest::InstancesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instances_test.rb:178:in `test_instance_attributes'
./tests/instances_test.rb:39:in `test_inst1_has_correct_attributes']:
expected: true,
got: false (using ==)
13) Failure:
test_it_create_a_new_instance_using_image_id(DeltacloudUnitTest::InstancesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instances_test.rb:74:in
`test_it_create_a_new_instance_using_image_id']:
expected: 302,
got: 404 (using ==)
14) Failure:
test_it_create_a_new_instance_using_image_id_and_name(DeltacloudUnitTest::InstancesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instances_test.rb:88:in
`test_it_create_a_new_instance_using_image_id_and_name']:
expected: 302,
got: 404 (using ==)
15) Failure:
test_it_create_a_new_instance_using_image_id_and_name_and_hwp(DeltacloudUnitTest::InstancesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instances_test.rb:103:in
`test_it_create_a_new_instance_using_image_id_and_name_and_hwp']:
expected: 302,
got: 404 (using ==)
16) Failure:
test_it_responses_to_html(DeltacloudUnitTest::InstancesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instances_test.rb:61:in `test_it_responses_to_html']:
expected: 200,
got: 404 (using ==)
17) Error:
test_it_responses_to_json(DeltacloudUnitTest::InstancesTest):
JSON::ParserError: 705: unexpected token at '<h1>Not Found</h1>'
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
./tests/instances_test.rb:50:in `test_it_responses_to_json'
18) Failure:
test_it_returns_instances(DeltacloudUnitTest::InstancesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/instances_test.rb:17:in `test_it_returns_instances']:
expected: > 0,
got: 0
19) Failure:
test_it_returns_valid_realm(DeltacloudUnitTest::InstancesTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instances_test.rb:178:in `test_instance_attributes'
./tests/instances_test.rb:45:in `test_it_returns_valid_realm']:
expected: true,
got: false (using ==)
20) Error:
test_it_z0_stop_and_start_instance(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
./tests/instances_test.rb:113:in `test_it_z0_stop_and_start_instance'
21) Error:
test_z0_reboot_instance(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
./tests/instances_test.rb:134:in `test_z0_reboot_instance'
22) Error:
test_z1_stop_created_instances(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
./tests/instances_test.rb:147:in `test_z1_stop_created_instances'
23) Error:
test_z2_destroy_created_instances(DeltacloudUnitTest::InstancesTest):
NoMethodError: undefined method `each' for nil:NilClass
./tests/instances_test.rb:160:in `test_z2_destroy_created_instances'
24) Failure:
test_it_responses_to_html(DeltacloudUnitTest::RealmsTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instance_states_test.rb:40:in `test_it_responses_to_html']:
expected: 200,
got: 404 (using ==)
25) Error:
test_it_responses_to_json(DeltacloudUnitTest::RealmsTest):
JSON::ParserError: 705: unexpected token at '<h1>Not Found</h1>'
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
/usr/lib/ruby/gems/1.8/gems/json-1.4.6/lib/json/common.rb:146:in `parse'
./tests/instance_states_test.rb:33:in `test_it_responses_to_json'
26) Failure:
test_it_responses_to_png(DeltacloudUnitTest::RealmsTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/instance_states_test.rb:46:in `test_it_responses_to_png']:
expected: 200,
got: 404 (using ==)
27) Failure:
test_it_returns_instance_states(DeltacloudUnitTest::RealmsTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/instance_states_test.rb:17:in `test_it_returns_instance_states']:
expected: > 0,
got: 0
28) Failure:
test_it_returns_realms(DeltacloudUnitTest::RealmsTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:63:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`>'
./tests/realms_test.rb:17:in `test_it_returns_realms']:
expected: > 0,
got: 0
29) Failure:
test_it_returns_valid_realm(DeltacloudUnitTest::RealmsTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/realms_test.rb:74:in `test_realm_attributes'
./tests/realms_test.rb:36:in `test_it_returns_valid_realm']:
expected: true,
got: false (using ==)
30) Failure:
test_us_has_correct_attributes(DeltacloudUnitTest::RealmsTest)
[/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in
`fail_with'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:39:in
`fail_with_message'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:61:in
`__delegate_operator'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:51:in
`eval_match'
/usr/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/matchers/operator_matcher.rb:29:in
`=='
./tests/realms_test.rb:74:in `test_realm_attributes'
./tests/realms_test.rb:30:in `test_us_has_correct_attributes']:
expected: true,
got: false (using ==)
55 tests, 0 assertions, 21 failures, 9 errors
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I"lib" "/usr/lib/ruby/gems/...]
(See full trace by running task with --trace)