Skip to content

Instantly share code, notes, and snippets.

View smcabrera's full-sized avatar
🐶

Stephen Mariano Cabrera smcabrera

🐶
View GitHub Profile
# rvm install 2.3.1
# gem install bundle
# gem update --system
# bundle install
# rails app:update:bin
# ^^ hit "a" to overwrite all
describe 'delegates some_method' do
it 'delegates delegated_method to delegated_class' do
this_class.delegated_method
expect(delegated_class).to have_received(:delegated_method)
end
end
class QuoteExporter
include MailerStyleHelper
include LeadMailerHelper
def initialize(lead)
@lead = lead
end
attr_reader :lead
require 'spec_helper'
describe 'QuoteExporter' do
describe '#export' do
before do
#test_data = Rails.root.join('spec', 'data', "quote-12345.html")
#allow_any_instance_of(QuoteExporter).to receive(:export)
#.and_return(test_data)
#allow_any_instance_of(SendQuoteUrlToWlAppJob).to receive(:create_quote_url)
#.and_return 'filepicker.io/fakeurl'
class QuoteExporter
include MailerStyleHelper
include LeadMailerHelper
BASE = 'https://www.filepicker.io/api/store/S3'
APIKEY = ENV["FILEPICKER_API_KEY"]
def initialize(lead_id, current_user, message)
lead = Lead.find(lead_id)
@lead = LeadPresenter.new(lead, current_user)
<% if @_message && email_to_planner?(@_message, @lead.planner_email) %>
<tr>
<td style="padding: 15px; background-color:#E2E5EE; margin:30px 0 15px;">
<p style="<%= h3_style %>">
What can I do next?
</p>
<%= render 'lead_mailer/response_buttons',
lead: @lead,
source: @source,
email_address: @current_user.email

it('asserts that it is what it is', function() { var itIs = true whatItIs = true expect(itIs).toequal(whatItIs); });

describe('WhiteLabel.Views.ProposalRequests.EventSpace.AdditionalInfo', function() {
beforeEach(function() {
var html = '<section id="additional-info"></section>';
$('body').append($(html));
this.region = new Backbone.Marionette.Region({ el: '#additional-info' });
});
afterEach(function() {
this.region.$el.remove();
});
def notify_of_request
if current_property_group.third_party? && (cannot? :coordinate, current_property_group)
ProposalRequestMailer.delay.confirm_request(@proposal_request.id)
ProposalRequestMailer.delay.notify_of_request(@proposal_request.id,
current_property_group.third_party.id
)
end
end
events: {
'input @ui.functionDescription': 'updateProposalRequest',
// TODO: This might not work play around with it
'select @ui.largestFunction': 'updateLargestFunction'
},