t-minus 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,25 @@ module Rspec
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def include_test_helper
|
18
|
-
|
18
|
+
if File.exists? File.expand_path('spec/spec_helper.rb', @_source_root)
|
19
|
+
append_file 'spec/spec_helper.rb', "require 't-minus/test_helper'"
|
20
|
+
else
|
21
|
+
create_file 'spec/spec_helper.rb', <<-FILE
|
22
|
+
ENV['RAILS_ENV'] ||= 'test'
|
23
|
+
require File.expand_path('../../config/environment', __FILE__)
|
24
|
+
require 'rspec/rails'
|
25
|
+
|
26
|
+
Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}
|
27
|
+
|
28
|
+
RSpec.configure do |config|
|
29
|
+
config.mock_with :rspec
|
30
|
+
config.fixture_path = "\#{::Rails.root}/spec/fixtures"
|
31
|
+
config.use_transactional_fixtures = true
|
32
|
+
end
|
33
|
+
|
34
|
+
require 't-minus/test_helper'
|
35
|
+
FILE
|
36
|
+
end
|
19
37
|
end
|
20
38
|
end
|
21
39
|
end
|
@@ -15,7 +15,16 @@ module TestUnit
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def include_test_helper
|
18
|
-
|
18
|
+
if File.exists? File.expand_path('test/test_helper.rb', @_source_root)
|
19
|
+
append_file 'test/test_helper.rb', "require 't-minus/test_helper'"
|
20
|
+
else
|
21
|
+
create_file 'test/test_helper.rb', <<-FILE
|
22
|
+
ENV['RAILS_ENV'] = 'test'
|
23
|
+
require File.expand_path('../../config/environment', __FILE__)
|
24
|
+
require 'rails/test_help'
|
25
|
+
require 't-minus/test_helper'
|
26
|
+
FILE
|
27
|
+
end
|
19
28
|
end
|
20
29
|
end
|
21
30
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: t-minus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Grimes
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-23 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|