blindfold 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/blindfold.gemspec +4 -26
- data/lib/blindfold/helpers/machinist.rb +21 -0
- data/lib/blindfold/helpers/text.rb +5 -0
- metadata +30 -13
- data/.gitignore +0 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/blindfold.gemspec
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'blindfold'
|
5
|
-
gem.version = '0.0.
|
6
|
-
gem.date = %{2010-06-
|
5
|
+
gem.version = '0.0.4'
|
6
|
+
gem.date = %{2010-06-26}
|
7
7
|
|
8
8
|
gem.authors = ["James Bunch (fallwith)"]
|
9
9
|
gem.email = nil
|
@@ -14,33 +14,11 @@ Gem::Specification.new do |gem|
|
|
14
14
|
express purpose of providing integration test coverage for web based
|
15
15
|
API services (especially those with an XML response)."
|
16
16
|
|
17
|
-
gem.files =
|
18
|
-
'.gitignore',
|
19
|
-
'bin/blindfold',
|
20
|
-
'blindfold.gemspec',
|
21
|
-
'config/spec.opts',
|
22
|
-
'init.rb',
|
23
|
-
'lib/blindfold/connection.rb',
|
24
|
-
'lib/blindfold/helpers/date.rb',
|
25
|
-
'lib/blindfold/helpers/db.rb',
|
26
|
-
'lib/blindfold/helpers.rb',
|
27
|
-
'lib/blindfold/launcher.rb',
|
28
|
-
'lib/blindfold/spec/matchers/be_an_ip_address.rb',
|
29
|
-
'lib/blindfold/spec/matchers/be_an_iso_date.rb',
|
30
|
-
'lib/blindfold/spec/matchers/be_ok.rb',
|
31
|
-
'lib/blindfold/spec/monkey.rb',
|
32
|
-
'lib/blindfold/spec.rb',
|
33
|
-
'lib/blindfold/xml/monkey.rb',
|
34
|
-
'lib/blindfold/xml.rb',
|
35
|
-
'lib/blindfold.rb',
|
36
|
-
'MIT-LICENSE',
|
37
|
-
'Rakefile',
|
38
|
-
'README.rdoc',
|
39
|
-
'VERSION'
|
40
|
-
]
|
17
|
+
gem.files = `git ls-files -z`.split("\0").reject{|f|f =~ /^\./}
|
41
18
|
|
42
19
|
gem.add_dependency('rspec', '>= 1.3.0')
|
43
20
|
gem.add_dependency('rack-test', '>= 0.5.4')
|
44
21
|
gem.add_dependency('machinist', '>= 1.0.6')
|
45
22
|
gem.add_dependency('forgery', '>= 0.3.4')
|
23
|
+
gem.add_dependency('nokogiri', '>= 1.3.2')
|
46
24
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module HelperMethods
|
2
|
+
# Spawn n blueprint driven instances of a model
|
3
|
+
# NOTE: Machinist2 makes this easy enough to do with 'make' itself
|
4
|
+
def spawn(name, args={})
|
5
|
+
|
6
|
+
# Reload Machinist blueprints despite them having been loaded earlier.
|
7
|
+
# For some reason, Rack::Test's use of ActionController::Dispatcher.call(env)
|
8
|
+
# causes the blueprints to fall out of scope for the next Connection instance.
|
9
|
+
#
|
10
|
+
# TODO: determine root cause, raise ticket if necessary with Rack::Test
|
11
|
+
#
|
12
|
+
blueprints_dir = File.join(Blindfold.config_dir, Launcher.blueprints_dir)
|
13
|
+
if Dir.exists?(blueprints_dir)
|
14
|
+
Dir[File.join(blueprints_dir,'**','*_blueprint.rb')].each {|f| load f}
|
15
|
+
end
|
16
|
+
|
17
|
+
klass = name.to_s.singularize.camelize.constantize
|
18
|
+
# klass.make(args)
|
19
|
+
OpenStruct.new(klass.make(args).attributes)
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blindfold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Bunch (fallwith)
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-26 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -82,6 +82,22 @@ dependencies:
|
|
82
82
|
version: 0.3.4
|
83
83
|
type: :runtime
|
84
84
|
version_requirements: *id004
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: nokogiri
|
87
|
+
prerelease: false
|
88
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
hash: 31
|
94
|
+
segments:
|
95
|
+
- 1
|
96
|
+
- 3
|
97
|
+
- 2
|
98
|
+
version: 1.3.2
|
99
|
+
type: :runtime
|
100
|
+
version_requirements: *id005
|
85
101
|
description: |-
|
86
102
|
Blindfold brings together RSpec, Rack::Test, and Machinist for the
|
87
103
|
express purpose of providing integration test coverage for web based
|
@@ -94,28 +110,29 @@ extensions: []
|
|
94
110
|
extra_rdoc_files: []
|
95
111
|
|
96
112
|
files:
|
97
|
-
-
|
113
|
+
- MIT-LICENSE
|
114
|
+
- README.rdoc
|
115
|
+
- Rakefile
|
116
|
+
- VERSION
|
98
117
|
- bin/blindfold
|
99
118
|
- blindfold.gemspec
|
100
119
|
- config/spec.opts
|
101
120
|
- init.rb
|
121
|
+
- lib/blindfold.rb
|
102
122
|
- lib/blindfold/connection.rb
|
123
|
+
- lib/blindfold/helpers.rb
|
103
124
|
- lib/blindfold/helpers/date.rb
|
104
125
|
- lib/blindfold/helpers/db.rb
|
105
|
-
- lib/blindfold/helpers.rb
|
126
|
+
- lib/blindfold/helpers/machinist.rb
|
127
|
+
- lib/blindfold/helpers/text.rb
|
106
128
|
- lib/blindfold/launcher.rb
|
129
|
+
- lib/blindfold/spec.rb
|
107
130
|
- lib/blindfold/spec/matchers/be_an_ip_address.rb
|
108
131
|
- lib/blindfold/spec/matchers/be_an_iso_date.rb
|
109
132
|
- lib/blindfold/spec/matchers/be_ok.rb
|
110
133
|
- lib/blindfold/spec/monkey.rb
|
111
|
-
- lib/blindfold/spec.rb
|
112
|
-
- lib/blindfold/xml/monkey.rb
|
113
134
|
- lib/blindfold/xml.rb
|
114
|
-
- lib/blindfold.rb
|
115
|
-
- MIT-LICENSE
|
116
|
-
- Rakefile
|
117
|
-
- README.rdoc
|
118
|
-
- VERSION
|
135
|
+
- lib/blindfold/xml/monkey.rb
|
119
136
|
has_rdoc: true
|
120
137
|
homepage: http://github.com/fallwith/blindfold
|
121
138
|
licenses: []
|
data/.gitignore
DELETED