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
Using gpgme (1.0.9) from https://github.com/mrsimo/ruby-gpgme.git (at master) with native extensions /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) | |
/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb | |
checking for gpgme-config... no | |
gpgme-config not found | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more | |
details. You may need configuration options. |
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
using System; | |
namespace ChapterOneExample. Utilities | |
{ | |
public class StringUtilities | |
{ | |
public int CountOccurences(string stringToCheck, | |
string stringToFind) | |
{ |
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
[ ["1,2",3], ["1,3",4] ].each do |arr| | |
it "'s add method should return the sum of multiple numbers" do | |
StringCalc.new.add(arr[0]).should == arr[1] | |
end | |
end |
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
#!/usr/bin/env zsh | |
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
setopt promptsubst | |
autoload -U add-zsh-hook | |
PROMPT_SUCCESS_COLOR=$FG[117] | |
PROMPT_FAILURE_COLOR=$FG[124] | |
PROMPT_VCS_INFO_COLOR=$FG[242] |
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
from my tdd class: | |
[TestFixture, Isolated] | |
public class LoginManagerWithStaticTestIsolator1 | |
{ | |
[Test] | |
public void IsLoginOK_LoggerThrowsException_CalledWebService() | |
{ | |
LoginManagerWithFutureObject lm = new LoginManagerWithFutureObject(); |
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
public class Dinner | |
{ | |
public string Description { get; set; } | |
public string Title { get; set; } | |
public DateTime EventDate { get; set; } | |
public bool IsValid { get { return validate(); }} | |
private bool validate() | |
{ |
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
using System.IO; | |
namespace Demos.Inheritance | |
{ | |
interface ICustomLogger | |
{ | |
void Write(LogMessage msg); | |
void SetTarget(string locationOfFileOrService); | |
void Enable(); | |
void Disable(); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using TypeMock.Internal.Hooks; | |
namespace MyInterceptor | |
{ | |
public class Class1 | |
{ |
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" | |
class StringCalculator | |
def add(numbers) | |
return 0 if numbers == "" | |
return numbers.to_i unless numbers.include? "," | |
return numbers[0].to_i + numbers[2].to_i | |
end |
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 "test/unit" | |
class StringCalculator | |
NEGATIVES_MSG = "negatives not allowed" | |
START_OF_CUSTOMDELIM_INDEX = 3 | |
TOO_LARGE = 1001 | |
def add(numbers) |
OlderNewer