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 'sidekiq/testing' | |
require 'sidekiq_override' | |
Sidekiq::Testing.inline! | |
class MyWorker | |
include Sidekiq::Worker | |
@executed = false | |
cattr_accessor :executed | |
def perform | |
self.class.executed = true |
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
[KSPField(guiName = "Fuel crossfeed", | |
isPersistant = true, guiActive = true, guiActiveEditor = true)] | |
public bool fuelCrossFeed = false; | |
[KSPEvent(guiName = "Toggle crossfeed", name = "ToggleCrossFeed", | |
active = true, guiActive = true, guiActiveEditor = true, guiActiveUnfocused = false)] | |
public void ToggleCrossFeed() | |
{ | |
part.fuelCrossFeed = fuelCrossFeed = !fuelCrossFeed; | |
} |
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
var system, webpage, | |
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
system = require("system"); | |
webpage = require("webpage"); | |
this.Runner = (function() { | |
function Runner() { | |
this.waitForResults = __bind(this.waitForResults, this); |
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
Dummy::Application.routes.draw do | |
sections '/cms' do | |
section :bar, to: 'test#welcome2' | |
#section :bar do | |
# get ":id", to: 'test#welcome' | |
#end | |
get "/welcome" => 'test#welcome', section: :foo |
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
class @Mercury.Regions.BackgroundImage extends @Mercury.Regions.Image | |
@supported: document.getElementById | |
@supportedText: "Chrome 10+, Firefox 4+, IE 7+, Safari 5+, Opera 8+" | |
type = 'backgroundImage' | |
type: -> type | |
pushHistory: () -> | |
@history.push(src: @element.css('background-image')) | |
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
{ | |
"Bzzzrt": { | |
"token": ">TOKEN_BZZZRT", | |
"rooms": ["Jawa Yard Sale"], | |
"commands": {}, | |
"periodics": {}, | |
"responders": {} | |
} | |
} |
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 JsonSpec::Matchers | |
def look_like(json = nil) | |
JsonSpec::Matchers::LookLike.new(json) | |
end | |
class LookLike < BeJsonEql | |
def matches?(actual_json) | |
raise "Expected equivalent JSON not provided" if @expected_json.nil? |
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
source 'https://rubygems.org' | |
gem 'rails' | |
gem 'haml-rails' | |
gem 'coffee-rails' | |
gem 'sass-rails' | |
# Build process dependencies | |
gem 'uglifier' # javascript compression | |
gem 'yui-compressor' # css compression |
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
jasmine.Spec::expect = (actual) -> | |
@tested = true | |
positive = new (@getMatchersClass_())(@env, actual, this) | |
positive.not = new (@getMatchersClass_())(@env, actual, this, true) | |
return positive | |
jasmine.Runner::finishCallback = -> | |
for spec in @specs() | |
alert("#{spec.description} wasn't tested") unless spec.tested | |
@env.reporter.reportRunnerResults(@) |
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
# For evergreen nested directory support | |
# 1. Create a /config/evergreen.rb file and put these contents in it | |
module Evergreen | |
class Suite | |
def specs | |
Dir.glob(File.join(root, Evergreen.spec_dir, '**', '*_spec.{js,coffee,js.coffee}')).map do |path| | |
Spec.new(self, path.gsub(File.join(root), '')) | |
end | |
end |
NewerOlder