This file contains hidden or 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
| import junit.framework.TestCase; | |
| public class SimplesTeste extends TestCase { | |
| public void testSomeThign(){ | |
| assertTrue(4 == (2 * 2)); | |
| } | |
| } |
This file contains hidden or 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
| package br.com.compasso; | |
| public class Usuario extends FakeDB { | |
| private String nome; | |
| private String email; | |
| public boolean save(Usuario user){ | |
| usuarioInvalido(user); | |
| if(!super.fakedb.isEmpty()){ |
This file contains hidden or 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 Pessoa | |
| @attr_access // Isso gera os getters e setters implicitamente. | |
| String nome; | |
| String sobrenome; | |
| end |
This file contains hidden or 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
| public class EnviaEmails { | |
| public void enviarAsQuinzeHoras(Time tempo){ | |
| if(tempo.getHora() == 15){ | |
| enviarEmails(); | |
| } | |
| } | |
| private boolean enviarEmails(){ | |
| return true; |
This file contains hidden or 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
| public class TestEnviarEmails { | |
| @Test | |
| public void testEnvioDeEmails(){ | |
| EnviaEmails em = new EnviaEmails(); | |
| Time time = mock(Time.class); | |
| when(time.getHora()).thenReturn(15); |
This file contains hidden or 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
| <style>.VP5otc-Sqv85e{font-size:70%;font-family:arial,sans-serif;float:left;margin:0 8px 0 0;cursor:pointer}.VP5otc-pzeoBf{padding:6px 0 3px 3px;background:#e3e9ff;border-bottom:1px solid #CCD2E6}.VP5otc-U4m8q{padding:3px 0 6px 3px;background:#e3e9ff;border-top:1px solid #CCD2E6}.VP5otc-d2fWKd{height:6px;width:7px;background:url(?ui=2&view=dim&iv=10mbz5ej443i&it=vi) no-repeat -36px 50%;vertical-align:middle;font-size:0;margin-left:3px}.VP5otc-tOAp0c,.VP5otc-ynQFL{float:left;font:bold 80% arial,sans-serif;margin-right:4px;padding:2px 3px 0 3px}.VP5otc-tOAp0c{text-decoration:underline;cursor:pointer;color:#00c}.VP5otc-ynQFL{color:#000}.VP5otc-MdoD9{float:none!important;text-decoration:underline;margin-left:.5ex;padding:3px .5ex 0 0;cursor:pointer;font:normal 80% arial,sans-serif;color:#00c}.OeDJSe-eSumjb{position:absolute;bottom:1px;right:16px;z-index:4;background-color:#fffccf;border:1px solid #000;font-size:80%;color:#222;padding:10px}.OeDJSe-tOAp0c{color:#00c;white-space:nowrap;text-decoration:underline;curs |
This file contains hidden or 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 TC_google_suite < Test::Unit::TestCase | |
| def login | |
| test_site = 'http://www.gmail.com/' | |
| ff = Watir::Browser.new | |
| ff.goto(test_site) | |
| ff.text_field(:name, "Email").set("edipofederle") | |
| ff.text_field(:name, "Passwd").set("pass") | |
| ff.button(:value, "Sign in").click |
This file contains hidden or 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
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxCxDxBxegedabagacad | |
| alias ls="ls -G" | |
| #Git branchs | |
| export PS1="\[\033[00m\]\u:\[\033[00m\]\w\[\033[00m\] \`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[00m\]$\[\033[00m\] " | |
| # This loads RVM into a shell session. | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" |
This file contains hidden or 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 mock_client(stubs={}) | |
| @mock_client ||= mock_model(Client, stubs) | |
| end | |
| describe "GET index" do | |
| it "should redirect to index page with clients obj" do | |
| Client.stub(:find).with(:all, :order => "created_at desc").and_return([mock_client]) | |
| get :index |
This file contains hidden or 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
| @clients = Client.where("user_id = ? AND name LIKE ?", current_user.id, "%#{params[:search]}%").order("name ASC") |