zeus 0.15.2 → 0.15.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zeus (0.15.2)
4
+ zeus (0.15.3)
5
5
  method_source (>= 0.6.7)
6
6
 
7
7
  GEM
Binary file
Binary file
Binary file
Binary file
@@ -191,7 +191,11 @@ module Zeus
191
191
  if ENV['RAILS_TEST_HELPER']
192
192
  require ENV['RAILS_TEST_HELPER']
193
193
  else
194
- if File.exists?(ROOT_PATH + "/spec/spec_helper.rb")
194
+ if File.exists?(ROOT_PATH + "/spec/rails_helper.rb")
195
+ # RSpec >= 3.0+
196
+ require 'rails_helper'
197
+ elsif File.exists?(ROOT_PATH + "/spec/spec_helper.rb")
198
+ # RSpec < 3.0
195
199
  require 'spec_helper'
196
200
  elsif File.exists?(ROOT_PATH + "/test/minitest_helper.rb")
197
201
  require 'minitest_helper'
@@ -1,3 +1,3 @@
1
1
  module Zeus
2
- VERSION = "0.15.2"
2
+ VERSION = "0.15.3"
3
3
  end
@@ -17,7 +17,16 @@ module Zeus
17
17
  ENV.clear
18
18
  end
19
19
 
20
+ it "requires rails_helper when using rspec 3.0+" do
21
+ mock_file_existence(ROOT_PATH + "/spec/rails_helper.rb", true)
22
+
23
+ rails.should_receive(:require).with("rails_helper")
24
+
25
+ rails.test_helper
26
+ end
27
+
20
28
  it "when spec_helper exists spec_helper is required" do
29
+ mock_file_existence(ROOT_PATH + "/spec/rails_helper.rb", false)
21
30
  mock_file_existence(ROOT_PATH + "/spec/spec_helper.rb", true)
22
31
 
23
32
  rails.should_receive(:require).with("spec_helper")
@@ -26,6 +35,7 @@ module Zeus
26
35
  end
27
36
 
28
37
  it "when minitest_helper exists minitest_helper is required" do
38
+ mock_file_existence(ROOT_PATH + "/spec/rails_helper.rb", false)
29
39
  mock_file_existence(ROOT_PATH + "/spec/spec_helper.rb", false)
30
40
  mock_file_existence(ROOT_PATH + "/test/minitest_helper.rb", true)
31
41
 
@@ -34,7 +44,8 @@ module Zeus
34
44
  rails.test_helper
35
45
  end
36
46
 
37
- it "when there is no spec_helper or minitest_helper, test_helper is required" do
47
+ it "when there is no rspec helpers or minitest_helper, test_helper is required" do
48
+ mock_file_existence(ROOT_PATH + "/spec/rails_helper.rb", false)
38
49
  mock_file_existence(ROOT_PATH + "/spec/spec_helper.rb", false)
39
50
  mock_file_existence(ROOT_PATH + "/test/minitest_helper.rb", false)
40
51
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-26 00:00:00.000000000 Z
12
+ date: 2014-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -134,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  segments:
136
136
  - 0
137
- hash: 1370880474585093317
137
+ hash: 3094523066757945393
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: 1370880474585093317
146
+ hash: 3094523066757945393
147
147
  requirements: []
148
148
  rubyforge_project:
149
149
  rubygems_version: 1.8.23