This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installing cocaine 0.5.7 | |
Installing crack 0.4.2 | |
Installing chronic 0.10.2 | |
Installing hitimes 1.2.2 with native extensions | |
Installing bourbon 4.2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :question do | |
desc "Update Questions and Tasks to support newly added validations" | |
task :update_for_validations => :environment do | |
ActiveRecord::Base.transaction do | |
# Set question_type to "yesno" for following questions: | |
%w(need_long_term_rental need_short_term_rental find_eye_doctor cleaning need_home).each do |identifier| | |
q = Question.find_by_identifier(identifier) | |
q.update_attributes!(question_type: "yesno") if q.present? | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Account < ActiveRecord::Base | |
validates :email, uniqueness: true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rails_helper" | |
class CompanyOfficePage < SitePrism::Page | |
set_url "/company" | |
element :select_office, ".select-office" | |
element :office_name, "#office-name" | |
element :save_office_button, "#save-office-btn" | |
element :company_tasks, ".company-tasks" | |
element :company_faqs, ".company-faqs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rails_helper" | |
feature "Company/Office page spec", js: true do | |
let(:company) { FactoryGirl.create(:company) } | |
let(:employee) { FactoryGirl.create(:employee, full_city: "Chicago, IL", company: company) } | |
let!(:office_1) { FactoryGirl.create(:office, company: company, address: FactoryGirl.attributes_for(:chicago_address)) } | |
let!(:office_2) { FactoryGirl.create(:office, company: company, address: FactoryGirl.attributes_for(:chicago_address)) } | |
let!(:office_task) { FactoryGirl.create(:task, company: company, office: office_1) } | |
let!(:office_faq) { FactoryGirl.create(:faq, company: company, office: office_1) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SitePrism.configure do |config| | |
config.use_implicit_waits = true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_page_object.wait_until_blah_visible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect(page).to have_selector("#blah", visible: true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect(my_page_object).to have_blah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect(page).to have_css("#blah") |
NewerOlder