Skip to content

Instantly share code, notes, and snippets.

View demetriusnunes's full-sized avatar

demetriusnunes demetriusnunes

  • OLX
  • Rio de Janeiro, Brazil
View GitHub Profile
Feature: Counting lines of source code
Scenario: Counting lines succesfully
Given I have filled all the parameters correctly
When I click the GO button
Then I should have shown a line count
And I should have a file report generated in CSV format
And I should not have any error messages displaying
Scenario: Invalid parameters
@demetriusnunes
demetriusnunes / gist:113286
Created May 18, 2009 02:58
Patch for Ryan Bates' Scope Builder
From e86d28bb6a46160b7b1fc1cf7b55b473aec8ed1e Mon Sep 17 00:00:00 2001
From: Demetrius Nunes <demetriusnunes@gmail.com>
Date: Sun, 17 May 2009 23:55:26 -0300
Subject: [PATCH] Just fixing the file name of README so it looks better on github
---
README | 56 --------------------------------------------------------
README.rdoc | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 56 deletions(-)
delete mode 100644 README
Funcionalidade: Buttons locators and events
Cenario: Button clicking
Dado the frame "SwingSet" is a container
E the toolbar button "#1" is selected
E the tab "Button Demo" is a container
Quando eu clicar no botão "One"
Quando eu clicar no botão "Two"
Quando eu clicar no botão "Three!"
Using org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer
It takes a while for the scenarios to begin executing, so please be patient...
Source: button_steps.rb:1
I click the button "([^\"]*)"
I click the button "([^\"]*)" no block
Source: checkbox_steps.rb:1
I click the checkbox "([^\"]*)"
the checkbox "([^\"]*)" should (not )*be selected
@demetriusnunes
demetriusnunes / core.clj
Created October 17, 2011 17:51
Validador de redirects em clojure
(ns ego-checker.core
(:require [clj-http.client :as http]
[clojure.data.csv :as csv]
[clojure.java.io :as io]))
(def *file-urls* "lista-urls.txt")
(def *log-file-path* "error.log")
(defn test-url [url]
(try (let [resp (http/get url {:follow-redirects false})]
@demetriusnunes
demetriusnunes / robot.js
Created December 3, 2012 13:01
W00t #1 YEAH!!!! (Zolmesiter)
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
//robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
@demetriusnunes
demetriusnunes / robot.js
Created December 10, 2012 20:53 — forked from p7o/robot.js
Gunkerzer
//FightCode can only understand your robot
//if its class is called Robot
var direction = 1;
var moveStep = 7;
var rotateStep = 1;
var initialized = false;
var noScanCount = 0;
angular.module('ProductsService', []).factory('Products', ['$http', function ($http) {
return {
get: function () {
return $http.get('/api/products');
},
create: function (data) {
return $http.get('/api/products', data);
},
@demetriusnunes
demetriusnunes / rootScope.js
Last active August 29, 2015 13:58
Extending $scope
angular.module("myApp").run(function ($rootScope) {
var proto = Object.getPrototypeOf($rootScope);
angular.extend(proto, {
$waitFor: function (expression, fn) {
var un = this.$watch(expression, function (value) {
if (value === undefined) return;
un();
return fn(value);
});
@demetriusnunes
demetriusnunes / angularExtensions.js
Last active August 29, 2015 14:04
Extending $q promises with a .set method
angular.module("myApp")
.config(function ($provide) {
$provide.decorator('$q', function($delegate) {
var defer = $delegate.defer;
$delegate.defer = function() {
var deferred = defer();
deferred.promise.set = function(object, property) {
return deferred.promise.then(function(value) {
object[property] = value;