save_and_open_page
have_button(locator)
#!/bin/bash | |
# install zsh | |
rm -fr .oh-my-zsh/ | |
curl -L http://install.ohmyz.sh > install.sh | |
sh install.sh | |
# add final .zshrc | |
echo 'source ~/.bash_aliases' >> ~/.zshrc | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> >> ~/.zshrc |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
#encoding: utf-8 | |
pt-BR: | |
views: | |
pagination: | |
first: "« Primeira" | |
last: "Última »" | |
previous: "‹ Anterior" | |
next: "Próxima ›" | |
truncate: "…" |
desc "Rolls back the latest release" | |
task :rollback => :environment do | |
queue! %[echo "-----> Rolling back to previous release for instance: #{domain}"] | |
# Delete existing sym link and create a new symlink pointing to the previous release | |
queue %[echo -n "-----> Creating new symlink from the previous release: "] | |
queue %[ls "#{deploy_to}/releases" -Art | sort | tail -n 2 | head -n 1] | |
queue! %[ls -Art "#{deploy_to}/releases" | sort | tail -n 2 | head -n 1 | xargs -I active ln -nfs "#{deploy_to}/releases/active" "#{deploy_to}/current"] | |
# Remove latest release folder (active release) |
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
require 'mina/rvm' # for rvm support. (http://rvm.io) | |
# Repository project | |
set :repository, 'git@bitbucket.org:agencia-w3case/boletinonline.git' | |
# Server Production | |
task :production do |
# Configure Timezone | |
dpkg-reconfigure tzdata | |
# Configure locale | |
locale-gen pt_BR pt_BR.UTF-8 | |
locale-gen en_US en_US.UTF-8 | |
# Instalar Postgree e trocar senha | |
sudo apt-get install postgresql postgresql-contrib | |
psql -c "ALTER USER postgres WITH PASSWORD 'nova_senha'" -d template1 |
def parent_params | |
params.require(:parent).permit( | |
:name, :rg, :cpf, :birth_date, :avatar, {:student_ids => []}, | |
:user_attributes => [:email, :password, :password_confirmation] | |
) | |
end |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |