Skip to content

Instantly share code, notes, and snippets.

View leviwilson's full-sized avatar

Levi Wilson leviwilson

  • Northwoods
  • Colorado, USA
View GitHub Profile
@leviwilson
leviwilson / Gemfile
Last active August 29, 2015 13:56
mohawk / uia gem setup
source 'http://rubygems.org'
# ...
gem 'mohawk', git: 'git://github.com/leviwilson/mohawk.git', branch: 'uia_gem'
gem 'uia', git: 'git://github.com/northwoodspd/uia.git'
# ...
class YourScreen
include Mohawk
def press_enter
w = Uia.find_element handle: adapter.window.handle # get the top-level window for this screen
t = w.find id: 'yourTextFieldId'
t.send_keys :enter
end
end
@leviwilson
leviwilson / .gitattributes
Created February 19, 2014 19:25
Default .gitattributes that the Git for Visual Studio plugin gives you.
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.

Keybase proof

I hereby claim:

  • I am leviwilson on github.
  • I am leviwilson (https://keybase.io/leviwilson) on keybase.
  • I have a public key whose fingerprint is 3392 4A26 7AC8 21D5 9E80 802D 12C5 EA5D 4297 5CD8

To claim this, I am signing this object:

class Object
def kill_puppies(how_many)
sleep how_many
end
end
@leviwilson
leviwilson / README.md
Last active August 29, 2015 14:05
Kiwi Helper Class Question

Background

Warning: I do not know objective-c that well

I'm working in some specs. Sometimes I see an opportunity to use some test helpers to eliminate some duplication in my testing. I'd like to be able to create a helper class that is able to wrap some of these helper verification methods and re-use it to clean up some of my specs.

Problem

I don't have access to any of the should flavor of Kiwi verifications within my tester. I'm assuming because I'm not within the SPEC_BEGIN / SPEC_END (as those macros call other Kiwi methods).

The Question

myapp.controller('myController', ['myService', function (myService) {
$scope.autofillSearch; //Input field in HTML
$scope.findAutofill = function () {
myService.autofill($scope.autofillSearch)
.success(function (data) {
window.console.log('Yay! ' + data);
})
.error(function () {
window.console.log('BOOO!');
});
require 'faraday'
require 'dotenv'
require 'json'
module MeaningCloud
def self.topics(options)
request :topics, options, lang: 'en', tt: 'ecr'
end
def self.sentiment(options)
@leviwilson
leviwilson / CppUTest_MockTest.cpp
Created February 17, 2011 16:42
CppUTest - expectNCalls fails with ignoreOtherParameters
#include <iostream>
#include <CppUTest/CommandLineTestRunner.h>
#include <CppUTestExt/MockSupport.h>
using namespace std;
class Foo
{
public:
virtual void MyFunction(int something)
#ifndef MemLeakCheckingTest_h
#define MemLeakCheckingTest_h
#include <gtest/gtest.h>
#if defined(WIN32) && defined(_DEBUG)
// Used to redirect _CrtXXX functions output to stderr, instead of the MSVC
// trace window.
int __cdecl crtReportHook(int reportType, char *szMsg, int *retVal)