File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
### Development
2
2
[ Full Changelog] ( https://github.com/rspec/rspec-rails/compare/v6.0.0.rc1...main )
3
3
4
+ Enhancements:
5
+
6
+ * Generators now respects default path configuration option. (@vivekmiyani , #2508 )
7
+
4
8
Breaking Changes:
5
9
6
10
* Change the order of ` after_teardown ` from ` after ` to ` around ` in system
@@ -73,8 +77,6 @@ Bug Fixes:
73
77
` run_in_transaction? ` method. (Stan Lo, #2495 )
74
78
* Prevent keyword arguments being lost when methods are invoked dynamically
75
79
in controller specs. (Josh Cheek, #2509 , #2514 )
76
- * Read configuration options from files to respect spec path setting.
77
- (@vivekmiyani , #2508 )
78
80
79
81
### 5.0.1 / 2021-03-18
80
82
[ Full Changelog] ( https://github.com/rspec/rspec-rails/compare/v5.0.0...v5.0.1 )
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ def self.source_root(path = nil)
20
20
end
21
21
end
22
22
23
- # Read configuration options from files to respect `--default-path`
23
+ # @private
24
+ # Load configuration from RSpec to ensure `--default-path` is set
24
25
def self . configuration
25
26
@configuration ||= begin
26
27
configuration = RSpec . configuration
Original file line number Diff line number Diff line change @@ -44,9 +44,11 @@ def generate_rspec_init(tmpdir)
44
44
replace_generator_command ( spec_helper_path )
45
45
remove_warnings_configuration ( spec_helper_path )
46
46
47
- dot_rspec_path = File . join ( tmpdir , '.rspec' )
47
+ unless default_path == "spec"
48
+ dot_rspec_path = File . join ( tmpdir , '.rspec' )
48
49
49
- append_default_path ( dot_rspec_path )
50
+ append_default_path ( dot_rspec_path )
51
+ end
50
52
end
51
53
52
54
def replace_generator_command ( spec_helper_path )
You can’t perform that action at this time.
0 commit comments