thincloud-test 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/lib/generators/thincloud/test/templates/capybara.rb +10 -0
- data/lib/generators/thincloud/test/templates/factory_girl.rb +1 -0
- data/lib/generators/thincloud/test/templates/minitest.rb +8 -0
- data/lib/generators/thincloud/test/templates/minitest_helper.rb +2 -16
- data/lib/generators/thincloud/test/templates/routing_spec.rb +12 -0
- data/lib/generators/thincloud/test/test_generator.rb +4 -1
- data/lib/thincloud/test/version.rb +1 -1
- data/lib/thincloud/test.rb +2 -0
- data/lib/thincloud-test.rb +9 -2
- data/thincloud-test.gemspec +13 -12
- metadata +23 -19
data/Gemfile
CHANGED
@@ -11,23 +11,9 @@ if RUBY_ENGINE == "ruby"
|
|
11
11
|
end
|
12
12
|
|
13
13
|
ENV["RAILS_ENV"] = "test"
|
14
|
-
require File.expand_path(
|
14
|
+
require File.expand_path("../../config/environment", __FILE__)
|
15
15
|
|
16
|
-
require "
|
17
|
-
|
18
|
-
require "minitest/autorun"
|
19
|
-
require "minitest/rails"
|
20
|
-
require "minitest/pride" # Provides awesome colorful output
|
21
|
-
require "minitest-rails-shoulda" # shoulda matchers
|
22
|
-
|
23
|
-
# Uncomment if you want Capybara in accceptance/integration tests
|
24
|
-
# require "minitest/rails/capybara"
|
25
|
-
|
26
|
-
require "mocha" # mocks and stubs
|
27
|
-
|
28
|
-
# use factories instead of fixtures
|
29
|
-
require "factory_girl"
|
30
|
-
FactoryGirl.find_definitions
|
16
|
+
require "thincloud-test"
|
31
17
|
|
32
18
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
33
19
|
# in spec/support/ and its subdirectories.
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class RoutingSpec < MiniTest::Rails::ActiveSupport::TestCase
|
2
|
+
include ::ActionDispatch::Assertions::RoutingAssertions
|
3
|
+
include ::Rails.application.routes.url_helpers
|
4
|
+
|
5
|
+
# Test subjects containing 'Routes' are treated as Routing tests
|
6
|
+
# e.g. describe "Product Routes" do ...
|
7
|
+
register_spec_type /Routes/, self
|
8
|
+
|
9
|
+
before do
|
10
|
+
@routes = ::Rails.application.routes
|
11
|
+
end
|
12
|
+
end
|
@@ -15,8 +15,11 @@ module Thincloud
|
|
15
15
|
remove_file "test/minitest_helper.rb"
|
16
16
|
copy_file "minitest_helper.rb", "test/minitest_helper.rb"
|
17
17
|
|
18
|
-
copy_file "
|
18
|
+
copy_file "capybara.rb", "test/support/capybara.rb"
|
19
|
+
copy_file "factory_girl.rb", "test/support/factory_girl.rb"
|
19
20
|
copy_file "database_cleaner.rb", "test/support/database_cleaner.rb"
|
21
|
+
copy_file "minitest.rb", "test/support/minitest.rb"
|
22
|
+
copy_file "routing_spec.rb", "test/support/routing_spec.rb"
|
20
23
|
copy_file "test.rake", "lib/tasks/test.rake"
|
21
24
|
|
22
25
|
copy_file "Guardfile"
|
data/lib/thincloud-test.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
|
-
require "
|
2
|
-
require "
|
1
|
+
require "database_cleaner" # reset database on each test run
|
2
|
+
require "minitest/autorun"
|
3
|
+
require "minitest/rails"
|
4
|
+
require "minitest/pride" # Provides awesome colorful output
|
5
|
+
require "minitest-rails-shoulda"
|
6
|
+
|
7
|
+
require "thincloud/test"
|
8
|
+
require "mocha"
|
9
|
+
require "factory_girl"
|
3
10
|
|
4
11
|
module Thincloud
|
5
12
|
module Test
|
data/thincloud-test.gemspec
CHANGED
@@ -16,16 +16,17 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.version = Thincloud::Test::VERSION
|
18
18
|
|
19
|
-
s.add_dependency "rails",
|
20
|
-
s.add_dependency "cane",
|
21
|
-
s.add_dependency "database_cleaner",
|
22
|
-
s.add_dependency "guard",
|
23
|
-
s.add_dependency "factory_girl_rails",
|
24
|
-
s.add_dependency "minitest",
|
25
|
-
s.add_dependency "guard-minitest",
|
26
|
-
s.add_dependency "minitest-rails",
|
27
|
-
s.add_dependency "
|
28
|
-
s.add_dependency "
|
29
|
-
s.add_dependency "
|
30
|
-
s.add_dependency "
|
19
|
+
s.add_dependency "rails", "~> 3.2.8"
|
20
|
+
s.add_dependency "cane", "~> 2.3.0"
|
21
|
+
s.add_dependency "database_cleaner", "~> 0.8.0"
|
22
|
+
s.add_dependency "guard", "~> 1.4.0"
|
23
|
+
s.add_dependency "factory_girl_rails", "~> 4.1.0"
|
24
|
+
s.add_dependency "minitest", "~> 3.5.0"
|
25
|
+
s.add_dependency "guard-minitest", "~> 0.5.0"
|
26
|
+
s.add_dependency "minitest-rails-shoulda", "~> 0.3.0"
|
27
|
+
s.add_dependency "rb-fsevent", "~> 0.9.1"
|
28
|
+
s.add_dependency "simplecov", "~> 0.7.1"
|
29
|
+
s.add_dependency "mocha", "~> 0.12.7" # Must be after minitest
|
30
|
+
s.add_dependency "minitest-rails-capybara", "~> 0.1"
|
31
|
+
|
31
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thincloud-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-10-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -126,13 +126,13 @@ dependencies:
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: 0.5.0
|
128
128
|
- !ruby/object:Gem::Dependency
|
129
|
-
name: minitest-rails
|
129
|
+
name: minitest-rails-shoulda
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
131
131
|
none: false
|
132
132
|
requirements:
|
133
133
|
- - ~>
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: 0.
|
135
|
+
version: 0.3.0
|
136
136
|
type: :runtime
|
137
137
|
prerelease: false
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -140,15 +140,15 @@ dependencies:
|
|
140
140
|
requirements:
|
141
141
|
- - ~>
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: 0.
|
143
|
+
version: 0.3.0
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
|
-
name:
|
145
|
+
name: rb-fsevent
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|
149
149
|
- - ~>
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: 0.
|
151
|
+
version: 0.9.1
|
152
152
|
type: :runtime
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -156,15 +156,15 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
159
|
+
version: 0.9.1
|
160
160
|
- !ruby/object:Gem::Dependency
|
161
|
-
name:
|
161
|
+
name: simplecov
|
162
162
|
requirement: !ruby/object:Gem::Requirement
|
163
163
|
none: false
|
164
164
|
requirements:
|
165
165
|
- - ~>
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: 0.
|
167
|
+
version: 0.7.1
|
168
168
|
type: :runtime
|
169
169
|
prerelease: false
|
170
170
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -172,15 +172,15 @@ dependencies:
|
|
172
172
|
requirements:
|
173
173
|
- - ~>
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version: 0.
|
175
|
+
version: 0.7.1
|
176
176
|
- !ruby/object:Gem::Dependency
|
177
|
-
name:
|
177
|
+
name: mocha
|
178
178
|
requirement: !ruby/object:Gem::Requirement
|
179
179
|
none: false
|
180
180
|
requirements:
|
181
181
|
- - ~>
|
182
182
|
- !ruby/object:Gem::Version
|
183
|
-
version: 0.
|
183
|
+
version: 0.12.7
|
184
184
|
type: :runtime
|
185
185
|
prerelease: false
|
186
186
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -188,15 +188,15 @@ dependencies:
|
|
188
188
|
requirements:
|
189
189
|
- - ~>
|
190
190
|
- !ruby/object:Gem::Version
|
191
|
-
version: 0.
|
191
|
+
version: 0.12.7
|
192
192
|
- !ruby/object:Gem::Dependency
|
193
|
-
name:
|
193
|
+
name: minitest-rails-capybara
|
194
194
|
requirement: !ruby/object:Gem::Requirement
|
195
195
|
none: false
|
196
196
|
requirements:
|
197
197
|
- - ~>
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: 0.
|
199
|
+
version: '0.1'
|
200
200
|
type: :runtime
|
201
201
|
prerelease: false
|
202
202
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -204,7 +204,7 @@ dependencies:
|
|
204
204
|
requirements:
|
205
205
|
- - ~>
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: 0.
|
207
|
+
version: '0.1'
|
208
208
|
description: Test harness generator for new Thincloud apps.
|
209
209
|
email:
|
210
210
|
- rbousquet@newleaders.com
|
@@ -230,13 +230,17 @@ files:
|
|
230
230
|
- app/views/.gitkeep
|
231
231
|
- config/routes.rb
|
232
232
|
- lib/generators/thincloud/test/templates/Guardfile
|
233
|
+
- lib/generators/thincloud/test/templates/capybara.rb
|
233
234
|
- lib/generators/thincloud/test/templates/database_cleaner.rb
|
234
235
|
- lib/generators/thincloud/test/templates/factory_girl.rb
|
236
|
+
- lib/generators/thincloud/test/templates/minitest.rb
|
235
237
|
- lib/generators/thincloud/test/templates/minitest_helper.rb
|
238
|
+
- lib/generators/thincloud/test/templates/routing_spec.rb
|
236
239
|
- lib/generators/thincloud/test/templates/test.rake
|
237
240
|
- lib/generators/thincloud/test/test_generator.rb
|
238
241
|
- lib/tasks/thincloud-test_tasks.rake
|
239
242
|
- lib/thincloud-test.rb
|
243
|
+
- lib/thincloud/test.rb
|
240
244
|
- lib/thincloud/test/engine.rb
|
241
245
|
- lib/thincloud/test/version.rb
|
242
246
|
- script/rails
|
@@ -295,7 +299,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
295
299
|
version: '0'
|
296
300
|
segments:
|
297
301
|
- 0
|
298
|
-
hash:
|
302
|
+
hash: 725469945553071907
|
299
303
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
304
|
none: false
|
301
305
|
requirements:
|
@@ -304,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
304
308
|
version: '0'
|
305
309
|
segments:
|
306
310
|
- 0
|
307
|
-
hash:
|
311
|
+
hash: 725469945553071907
|
308
312
|
requirements: []
|
309
313
|
rubyforge_project:
|
310
314
|
rubygems_version: 1.8.24
|