# Anchor
click_link 'Save'
# Button
click_button 'awesome'
# Both above
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
#lo sauer, 2013 - www.lsauer.com | |
#see: http://www.lsauer.com/2013/05/mysql-fuzzy-searching-fulltext-queries.html | |
#Note: In MySQL SUBSTRING, the string-index starts at position 1 | |
SELECT * FROM tablename | |
WHERE SOUNDEX(tablename_field) | |
LIKE CONCAT('%',SUBSTRING(SOUNDEX('Fuzti serch derm'),2),'%'); |
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
Based on http://www.alphadevx.com/a/455-Installing-Supervisor-and-Superlance-on-CentOS | |
Vgrnt box used: https://github.com/tommy-muehle/puppet-vagrant-boxes/releases/download/1.0.0/centos-6.6-x86_64.box | |
sudo yum install python-setuptools | |
sudo easy_install supervisor | |
supervisord --version | |
echo_supervisord_conf | sudo tee /etc/supervisord.conf | |
sudo mkdir -p /etc/supervisord/conf.d/ | |
sudo vi /etc/init.d/supervisord |
https://github.com/plataformatec/devise/wiki/How-To:-Stub-authentication-in-controller-specs
These are instructions for allowing you to use resource test doubles instead of actual ActiveRecord objects for testing controllers where Devise interactions are important. This means there's even less reliance on the database for controller specs, and that means faster tests!
This approach certainly needs some evolution, but it's a start.
To stub out your user for an action that expects an authenticated user, you'll want some code like this (once you've got Devise::TestHelpers
loaded):
user = double('user')