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 'minitest/mock' | |
require 'net/http' | |
m = MiniTest::Mock.new.expect(:foo, true, [Net::HTTP::Post.new("/")]) | |
p m.foo(1) | |
begin | |
m.verify | |
rescue Exception => e | |
puts "expected to raise" |
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
module A | |
def test_whatever | |
flunk 'sucks' | |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
something: Ember.computed(function() { | |
return 'Something'; | |
}), | |
list: [ |
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
#!/bin/bash | |
# SSH into multiple hosts with each in their own tmux pane. | |
if [ "$#" -lt 1 ]; then | |
cat >&2 <<-EOM | |
Usage: $(basename $0) host1 [ host2 ... ] [ -- ssh options ] | |
EOM | |
exit 1 | |
fi |