riot-gear 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  require 'teststrap'
2
2
 
3
3
  context "The asserts_json macro" do
4
-
4
+
5
5
  helper(:response) do
6
6
  {
7
7
  "a" => {"b" => "foo"},
@@ -14,5 +14,5 @@ context "The asserts_json macro" do
14
14
  asserts_json("c") do |value|
15
15
  value.map { |string, number| number }
16
16
  end.equals([1,2])
17
-
17
+
18
18
  end # The asserts_json macro
@@ -2,17 +2,21 @@ require 'teststrap'
2
2
  require 'ostruct'
3
3
 
4
4
  context "The cookie_values helper" do
5
- helper(:build_response) do |cookie_parts|
6
- OpenStruct.new( {:header => {"set-cookie" => cookie_parts.join("\n")}} )
7
- end
8
-
9
5
  hookup do
10
- @smoke_response = build_response([
6
+ cookies = [
11
7
  "foo=12345; path=/; expires=never-ever;",
12
8
  "goo=jam; path=/blue; expires=sometime-soon;",
13
- ])
9
+ ]
10
+ stub_request(:get, 'http://foo/tossed-cookies').
11
+ to_return({
12
+ :status => 200,
13
+ :headers => { "Set-Cookie" => cookies.join("\n") },
14
+ :body => ""
15
+ })
14
16
  end
15
17
 
18
+ get "http://foo/tossed-cookies"
19
+
16
20
  asserts("non-existent bar cookie") { cookie_values["bar"] }.nil
17
21
 
18
22
  asserts("existing foo cookie") do
@@ -51,7 +51,7 @@ context "A Riot Gear context" do
51
51
 
52
52
  asserts("providing an invalid format") do
53
53
  topic.format :boogers
54
- end.raises(HTTParty::UnsupportedFormat, "':boogers' Must be one of: html, json, plain, xml, yaml")
54
+ end.raises(HTTParty::UnsupportedFormat, "':boogers' Must be one of: html, json, plain, xml")
55
55
 
56
56
  debug_output StringIO.new
57
57
  asserts("default options for debug_output") do
@@ -9,7 +9,7 @@ context "Two distinct gear contexts" do
9
9
 
10
10
  setup { gear_up.topic }
11
11
  asserts_topic.kind_of(Class)
12
- asserts("equivalence of the topic for similar contexts") { topic == gear_up.topic }.not!
12
+ denies("equivalence of the topic for similar contexts") { topic == gear_up.topic }
13
13
  end # Setting up a gear context
14
14
 
15
15
  context "Gear context and its inner context" do
@@ -21,10 +21,11 @@ context "Gear context and its inner context" do
21
21
 
22
22
  setup { Riot::Context.new("A") {} }
23
23
 
24
- asserts("equivalence of the topic for similar contexts") do
24
+ denies("equivalence of the topic for similar contexts") do
25
25
  parent_topic = local_run(topic).topic
26
26
  child_topic = local_run(topic.context("B") {}).topic
27
27
 
28
28
  parent_topic == child_topic
29
- end.not!
29
+ end
30
30
  end # Setting up a gear context
31
+
data/test/teststrap.rb CHANGED
@@ -7,6 +7,8 @@ require 'json'
7
7
  require 'riot'
8
8
  require 'webmock'
9
9
 
10
+ Riot.dots if ENV["RIOT_FORMAT"] == "dots"
11
+
10
12
  Riot::Situation.instance_eval { include WebMock::API }
11
13
 
12
14
  require 'riot/gear'
metadata CHANGED
@@ -1,79 +1,62 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: riot-gear
3
- version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 8
10
- version: 0.0.8
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.9
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Justin 'Gus' Knowlden
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2010-12-23 00:00:00 -06:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2013-10-17 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: riot
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.12.5
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: httparty
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
39
25
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.12.5
30
+ - !ruby/object:Gem::Dependency
31
+ name: httparty
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.6.0
47
38
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: webmock
51
39
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
53
41
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 13
58
- segments:
59
- - 1
60
- - 6
61
- - 1
62
- version: 1.6.1
63
- type: :development
64
- version_requirements: *id003
65
- description: Riot + HTTParty smoke testing framework. You'd use it for integration testing with real HTTP requests and responses
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.6.0
46
+ description: Riot + HTTParty smoke testing framework. You'd use it for integration
47
+ testing with real HTTP requests and responses
66
48
  email: gus@gusg.us
67
49
  executables: []
68
-
69
50
  extensions: []
70
-
71
- extra_rdoc_files:
72
- - README.md
73
- files:
51
+ extra_rdoc_files: []
52
+ files:
53
+ - .gitignore
54
+ - .yardopts
55
+ - CHANGELOG
56
+ - Gemfile
57
+ - MIT-LICENSE
74
58
  - README.md
75
59
  - Rakefile
76
- - VERSION
77
60
  - lib/riot/gear.rb
78
61
  - lib/riot/gear/context.rb
79
62
  - lib/riot/gear/context/asserts_header.rb
@@ -82,6 +65,7 @@ files:
82
65
  - lib/riot/gear/context/persist_cookie.rb
83
66
  - lib/riot/gear/middleware.rb
84
67
  - lib/riot/gear/middleware/riotparty.rb
68
+ - lib/riot/gear/version.rb
85
69
  - riot-gear.gemspec
86
70
  - test/actions/delete_test.rb
87
71
  - test/actions/get_test.rb
@@ -93,41 +77,31 @@ files:
93
77
  - test/riotparty_proxy_methods_test.rb
94
78
  - test/setting_up_gear_context_test.rb
95
79
  - test/teststrap.rb
96
- has_rdoc: true
97
80
  homepage: http://github.com/thumblemonks/riot-gear
98
81
  licenses: []
99
-
100
82
  post_install_message:
101
83
  rdoc_options: []
102
-
103
- require_paths:
84
+ require_paths:
104
85
  - lib
105
- required_ruby_version: !ruby/object:Gem::Requirement
86
+ required_ruby_version: !ruby/object:Gem::Requirement
106
87
  none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- hash: 3
111
- segments:
112
- - 0
113
- version: "0"
114
- required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
93
  none: false
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- hash: 3
120
- segments:
121
- - 0
122
- version: "0"
94
+ requirements:
95
+ - - ! '>='
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
123
98
  requirements: []
124
-
125
99
  rubyforge_project:
126
- rubygems_version: 1.3.7
100
+ rubygems_version: 1.8.25
127
101
  signing_key:
128
102
  specification_version: 3
129
- summary: Riot + HTTParty smoke testing framework
130
- test_files:
103
+ summary: Riot + HTTParty smoke testing framework.
104
+ test_files:
131
105
  - test/actions/delete_test.rb
132
106
  - test/actions/get_test.rb
133
107
  - test/actions/post_test.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.8