File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ def self.initialize_configuration(config)
65
65
config . add_setting :use_instantiated_fixtures
66
66
config . add_setting :global_fixtures
67
67
config . add_setting :fixture_path
68
+ config . include RSpec ::Rails ::FixtureSupport , :use_fixtures
68
69
69
- # TODO: We'll need to create a deprecated module in order to properly
70
- # report to gems / projects which are relying on this being loaded
71
- # globally.
70
+ # We'll need to create a deprecated module in order to properly report to
71
+ # gems / projects which are relying on this being loaded globally.
72
72
#
73
73
# See rspec/rspec-rails#1355 for history
74
74
#
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ module RailsExampleGroup
11
11
include RSpec ::Rails ::MinitestLifecycleAdapter if ::Rails ::VERSION ::STRING >= '4'
12
12
include RSpec ::Rails ::MinitestAssertionAdapter
13
13
include RSpec ::Rails ::Matchers
14
+ include RSpec ::Rails ::FixtureSupport
14
15
end
15
16
end
16
17
end
Original file line number Diff line number Diff line change @@ -133,6 +133,19 @@ def in_inferring_type_from_location_environment
133
133
include_examples "infers type from location" , :feature , "spec/features"
134
134
end
135
135
136
+ it "fixture support is included with metadata `:use_fixtures`" do
137
+ in_sub_process do
138
+ RSpec . configuration . global_fixtures = [ :foo ]
139
+ RSpec . configuration . fixture_path = "custom/path"
140
+
141
+ group = RSpec . describe ( "Arbitrary Description" , :use_fixtures )
142
+
143
+ expect ( group ) . to respond_to ( :fixture_path )
144
+ expect ( group . fixture_path ) . to eq ( "custom/path" )
145
+ expect ( group . new . respond_to? ( :foo , true ) ) . to be ( true )
146
+ end
147
+ end
148
+
136
149
it "metadata `:type => :controller` sets up controller example groups" do
137
150
a_controller_class = Class . new
138
151
stub_const "SomeController" , a_controller_class
You can’t perform that action at this time.
0 commit comments