Skip to content

Commit

Permalink
fix(): update get bundle with SPM
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Echégut committed Sep 19, 2022
1 parent 81043ad commit e9c838a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Pod/Native/NativeRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ open class NativeRunner {
public class func runScenario(featureFile: String, scenario: String?, testCase: XCTestCase) {
testCase.state.loadAllStepsIfNeeded()

let path = Bundle(for: type(of: testCase)).resourceURL?.appendingPathComponent(featureFile)
var bundle = Bundle(for: type(of: testCase))
#if SWIFT_PACKAGE
bundle = Bundle.module
#endif
bundle.resourceURL?.appendingPathComponent(featureFile)
let featureFilePath = requireNotNil(path, "Path could not be built for feature file: \(featureFile)")

let features = loadFeatures(path: featureFilePath)
Expand Down

0 comments on commit e9c838a

Please sign in to comment.