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
# copy and paste this into your terminal to start an IRB session and use Capybara's DSL to write tests interactively | |
# Thanks to Tom Clements | |
# http://tom-clements.com/blog/2012/02/25/capybara-on-the-command-line-live-browser-testing-from-irb/ | |
irb | |
require 'capybara/dsl' | |
include Capybara::DSL | |
Capybara.default_driver = :selenium | |
visit "http://127.0.0.1:3000" | |
visit "http://www.google.com" #etc... |
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
fswatch -r -o -e 'pyc' . | (while read; do python *_test.py; done) |
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
stage 'test' | |
parallel ( | |
"scenario A": { | |
node { | |
echo 'dry run' | |
} | |
}, | |
"scenario B": { | |
node { | |
echo 'dry run' |
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
#language: pt | |
Funcionalidade: Leitor de tipos de Triângulo | |
Para conhecer o tipo de um triângulo | |
Como um aluno da matemática | |
Eu quero informar os tamanhos do lado de um triângulo e saber qual o tipo do triângulo | |
NARRATIVA | |
Um triângulo com todos os lados iguais é chamado Equilátero |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.clone(); |
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
rspec --require ./watir_html_formatter.rb --format WatirHtmlFormatter --out output/index.html test/bar_spec.spec |
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 "rspec/core/formatters/base_text_formatter" | |
class WatirHtmlFormatter < RSpec::Core::Formatters::BaseTextFormatter | |
end | |
def extra_failure_content(failure) | |
content = [] | |
content << "<span>" | |
file_name = save_html | |
content << link_for(file_name) |
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 "watir-webdriver" | |
b = Watir::Browser.new | |
b.goto "http://www.geradordecpf.org/" | |
arr = Array.new | |
5000.times do |i| | |
b.button(:value => "Gerar").click | |
arr.push(b.text_field(:id => "numero").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 "watir-webdriver" | |
b = Watir::Browser.new | |
b.goto "http://www.republicavirtual.com.br/cep/exemplos.php" | |
b.text_field(:id => "campoCEP").value = "<SEU CEP AQUI>" | |
b.button(:value => "buscar cep").click | |
puts Watir::Wait.until {b.div(:id => "resultado").text.include? "sucesso"} |
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
gem list | cut -d ' ' -f 1 | tee gems.txt | xargs gem uninstall -I -a && for path in $(echo `gem env path` | tr ":" "\n"); do rm -rf ${path}/specifications/* ${path}/cache/*; done && cat gems.txt | xargs gem install | |
rm gems.txt |
NewerOlder