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 CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source :rubygems
2
2
 
3
3
  # Specify your gem's dependencies in thincloud-test.gemspec
4
4
  gemspec
@@ -0,0 +1,10 @@
1
+ require "minitest/rails/capybara"
2
+
3
+ class MiniTest::Rails::ActionDispatch::IntegrationTest
4
+
5
+ # Public: Reset the Capybara session after every run.
6
+ teardown do
7
+ Capybara.reset_sessions!
8
+ end
9
+
10
+ end
@@ -1,3 +1,4 @@
1
1
  class MiniTest::Spec
2
2
  include FactoryGirl::Syntax::Methods
3
3
  end
4
+ FactoryGirl.find_definitions
@@ -0,0 +1,8 @@
1
+ class MiniTest::Rails::ActiveSupport::TestCase
2
+
3
+ # Register any classes that respond to validate to a specific test class
4
+ Minitest::Spec.register_spec_type(self) do |desc|
5
+ desc.respond_to?(:validate)
6
+ end
7
+
8
+ end
@@ -11,23 +11,9 @@ if RUBY_ENGINE == "ruby"
11
11
  end
12
12
 
13
13
  ENV["RAILS_ENV"] = "test"
14
- require File.expand_path('../../config/environment', __FILE__)
14
+ require File.expand_path("../../config/environment", __FILE__)
15
15
 
16
- require "database_cleaner" # reset database on each test run
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 "factory_girl.rb", "test/support/factory_girl.rb"
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"
@@ -1,5 +1,5 @@
1
1
  module Thincloud
2
2
  module Test
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -0,0 +1,2 @@
1
+ require "thincloud/test/version"
2
+ require "thincloud/test/engine"
@@ -1,5 +1,12 @@
1
- require "thincloud/test/version"
2
- require "thincloud/test/engine"
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
@@ -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", "~> 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", "~> 0.2.0"
27
- s.add_dependency "minitest-rails-shoulda", "~> 0.2.0"
28
- s.add_dependency "rb-fsevent", "~> 0.9.1"
29
- s.add_dependency "simplecov", "~> 0.6.4"
30
- s.add_dependency "mocha", "~> 0.12.5" # Must be after minitest
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.3.2
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-09-28 00:00:00.000000000 Z
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.2.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.2.0
143
+ version: 0.3.0
144
144
  - !ruby/object:Gem::Dependency
145
- name: minitest-rails-shoulda
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.2.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.2.0
159
+ version: 0.9.1
160
160
  - !ruby/object:Gem::Dependency
161
- name: rb-fsevent
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.9.1
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.9.1
175
+ version: 0.7.1
176
176
  - !ruby/object:Gem::Dependency
177
- name: simplecov
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.6.4
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.6.4
191
+ version: 0.12.7
192
192
  - !ruby/object:Gem::Dependency
193
- name: mocha
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.12.5
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.12.5
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: 4225137311479979046
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: 4225137311479979046
311
+ hash: 725469945553071907
308
312
  requirements: []
309
313
  rubyforge_project:
310
314
  rubygems_version: 1.8.24