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
function validaRut(campo){ | |
if ( campo.length == 0 ){ return false; } | |
if ( campo.length < 8 ){ return false; } | |
campo = campo.replace('-','') | |
campo = campo.replace(/\./g,'') | |
var suma = 0; | |
var caracteres = "1234567890kK"; | |
var contador = 0; |
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
=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') |
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 "prawn" | |
Prawn::Document.generate("report.pdf") do | |
10.times do | |
start_new_page | |
end | |
repeat :all do | |
move_down 50 |
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
[ | |
{ | |
"name": "Arica", | |
"code": "15101", | |
"provincia": "Arica", | |
"region": "Arica y Parinacota", | |
"region_number": "XV", | |
"region_iso_3166_2": "CL-AP" | |
}, | |
{ |
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
def command = "git --version" | |
def proc = command.execute() | |
proc.waitFor() | |
println "Process exit code: ${proc.exitValue()}" | |
println "Std Err: ${proc.err.text}" | |
println "Std Out: ${proc.in.text}" |