module Rectify::RSpec::Helpers

Public Instance Methods

stub_form(attributes) click to toggle source
# File lib/rectify/rspec/helpers.rb, line 11
def stub_form(attributes)
  Rectify::StubForm.new(attributes)
end
stub_query(query_class, options = {}) click to toggle source
# File lib/rectify/rspec/helpers.rb, line 6
def stub_query(query_class, options = {})
  results = options.fetch(:results, [])
  allow(query_class).to receive(:new) { StubQuery.new(results) }
end