lib/rspec-api/dsl/request.rb in rspec-api-0.1.2 vs lib/rspec-api/dsl/request.rb in rspec-api-0.2.0
- old
+ new
@@ -1,5 +1,6 @@
+require 'rack/utils'
require 'rspec-api/dsl/request/status'
require 'rspec-api/dsl/request/headers'
require 'rspec-api/dsl/request/body'
module DSL
@@ -49,10 +50,10 @@
def to_code(status_symbol)
Rack::Utils.status_code status_symbol
end
def has_entity_body?(status_code)
- Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.exclude? status_code
+ !Rack::Utils::STATUS_WITH_NO_ENTITY_BODY.include? status_code
end
def success?(status_code)
has_entity_body?(status_code) && status_code < 400
end
\ No newline at end of file