Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
15 Zeilen
466 B
Ruby
15 Zeilen
466 B
Ruby
# frozen_string_literal: true
|
|
|
|
def get_wizard_fixture(path)
|
|
JSON.parse(
|
|
File.open(
|
|
"#{Rails.root}/plugins/discourse-custom-wizard/spec/fixtures/#{path}.json"
|
|
).read
|
|
).with_indifferent_access
|
|
end
|
|
|
|
def enable_subscription(type)
|
|
CustomWizard::Subscription.stubs(:client_installed?).returns(true)
|
|
CustomWizard::Subscription.stubs("#{type}?".to_sym).returns(true)
|
|
CustomWizard::Subscription.any_instance.stubs("#{type}?".to_sym).returns(true)
|
|
end
|