File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,6 @@ module RSpec::Rails
37
37
38
38
expect_to_pass ( group )
39
39
end
40
-
41
- def expect_to_pass ( group )
42
- result = group . run ( failure_reporter )
43
- failure_reporter . exceptions . map { |e | raise e }
44
- expect ( result ) . to be true
45
- end
46
40
end
47
41
48
42
it "will allow #setup_fixture to run successfully" do
@@ -54,5 +48,25 @@ def expect_to_pass(group)
54
48
55
49
expect { group . new . setup_fixtures } . to_not raise_error
56
50
end
51
+
52
+ it "handles namespaced fixtures" do
53
+ group = RSpec ::Core ::ExampleGroup . describe do
54
+ include FixtureSupport
55
+ fixtures 'namespaced/model'
56
+
57
+ it 'has the fixture' do
58
+ namespaced_model ( :one )
59
+ end
60
+ end
61
+ group . fixture_path = File . expand_path ( '../../support/fixtures' , __dir__ )
62
+
63
+ expect_to_pass ( group )
64
+ end
65
+
66
+ def expect_to_pass ( group )
67
+ result = group . run ( failure_reporter )
68
+ failure_reporter . exceptions . map { |e | raise e }
69
+ expect ( result ) . to be true
70
+ end
57
71
end
58
72
end
Original file line number Diff line number Diff line change @@ -51,3 +51,13 @@ class AlternatePrimaryKeyModel < ActiveRecord::Base
51
51
52
52
attr_accessor :my_id
53
53
end
54
+
55
+ module Namespaced
56
+ class Model < ActiveRecord ::Base
57
+ def self . connection_fields
58
+ { name : :string }
59
+ end
60
+
61
+ extend Connections
62
+ end
63
+ end
Original file line number Diff line number Diff line change
1
+ one :
2
+ name : " Model #1"
You can’t perform that action at this time.
0 commit comments