turd 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/turd/assert.rb +5 -0
  2. data/lib/turd/version.rb +1 -1
  3. metadata +2 -2
@@ -12,11 +12,13 @@ module Turd
12
12
  if response[:response].include?(v)
13
13
  return response
14
14
  else
15
+ response.stored(:failed, option)
15
16
  raise AssertionFailure.new(response), "#{option} substring failure. expected #{v}, got #{response}"
16
17
  end
17
18
  end
18
19
  elsif option == :total_time
19
20
  if response[:total_time] > value
21
+ response.stored(:failed, option)
20
22
  raise AssertionFailure.new(response), "#{option} timing value was greater than allowed. expected #{value}, got #{response[:total_time]}"
21
23
  else
22
24
  return response
@@ -32,11 +34,13 @@ module Turd
32
34
  if response.options[option].include?(v)
33
35
  return return_http_response(response)
34
36
  else
37
+ response.options.store(:failed, option)
35
38
  raise AssertionFailure.new(return_http_response(response)), "#{option} substring failure. expected #{v}, got #{response.options[option]}"
36
39
  end
37
40
  end
38
41
  elsif option.to_s.include?("_time")
39
42
  if response.options[option] > value
43
+ response.options.store(:failed, option)
40
44
  raise AssertionFailure.new(return_http_response(response)), "#{option} timing value was greater than allowed. expected #{value}, got #{response.options[option]}"
41
45
  else
42
46
  return return_http_response(response)
@@ -45,6 +49,7 @@ module Turd
45
49
  if response.options[option] == value
46
50
  return return_http_response(response)
47
51
  else
52
+ response.options.store(:failed, option)
48
53
  raise AssertionFailure.new(return_http_response(response)), "#{option} did not match response definition. expected #{value}, got #{response.options[option]}"
49
54
  end
50
55
  end
@@ -1,3 +1,3 @@
1
1
  module Turd
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-17 00:00:00.000000000 Z
12
+ date: 2014-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus