This file contains hidden or 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
When player wins he should be paid 1-1 | |
When player loses, he is not paid | |
When player has blackjack, he is paid 1.5-1 | |
Scenario: Winning hand with a $50 bet | |
Given the player has a score of 19 | |
And the dealer has a score of 18 | |
And the player bet $50 | |
When the hand is played | |
Then the player wins $50 |
This file contains hidden or 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
Hashrocket, the best web design and development company in the universe, is | |
staffing up its Jacksonville Beach, FL headquarters and Chicago branch office. | |
This is your chance to consult clients around the world on the coolest projects | |
alongside an amazingly talented group of peers. | |
Minimum qualifications: | |
- Solid communications and client relationship skills | |
- At least 2 years of Rails programming experience* | |
- At least 5 years of web development experience | |
- Demonstrable knowledge of BDD and TDD techiques |
This file contains hidden or 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
# config/initializers/partial_path_override.rb | |
# Override possibly undesirable naming convention used by Rails to automatically determine | |
# the path to partial templates when you pass model objects to the render method | |
# by Obie Fernandez http://blog.obiefernandez.com/content/2011/05/rending-collections-of-heterogeneous-objects-in-rails-1.html | |
ActionView::Partials::PartialRenderer.class_eval do | |
private |
This file contains hidden or 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 AddCommentsCountToNominations < ActiveRecord::Migration | |
def self.up | |
add_column :nominations, :comments_count, :integer, null:false, default: 0 | |
nomination_ids_with_comments = Set.new | |
Comment.all.each {|c| nomination_ids_with_comments << c.nomination_id} | |
nomination_ids_with_comments.each do |nomination_id| | |
Nomination.reset_counters(nomination_id, :comments) | |
end | |
end |
This file contains hidden or 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
def be_guest_member_of(expected) | |
Class.new do | |
def initialize(expected) | |
@expected = expected | |
end | |
def matches?(target) | |
@target = target | |
@target.memberships.where(role: "guest").map(&:network).include? @expected | |
end |
This file contains hidden or 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
# See http://blog.obiefernandez.com/content/2012/02/metaprogramming-your-activerecord-objects-at-runtime.html for an explanation | |
require 'spec_helper' | |
describe Nomination do | |
let(:user1) { FactoryGirl.create(:user) } | |
let(:user2) { FactoryGirl.create(:user_with_nominations_received) } | |
let(:user3) { FactoryGirl.create(:user_with_nominations_received) } | |
let(:user4) { FactoryGirl.create(:user) } | |
let(:user5) { FactoryGirl.create(:user) } |
This file contains hidden or 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
if Rails.env.development? | |
module CoffeeScript | |
class SourceMapError < StandardError; end; | |
class << self | |
def compile script, options | |
script = script.read if script.respond_to?(:read) | |
if options.key?(:no_wrap) and !options.key?(:bare) |
This file contains hidden or 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
<link rel="import" href="../topeka-elements/category-images.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icons/av-icons.html"> | |
<link rel="import" href="../paper-fab/paper-fab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
This file contains hidden or 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
console.log('Loading function'); | |
var doc = require('dynamodb-doc'); | |
var dynamo = new doc.DynamoDB(); | |
/** | |
* Provide an event that contains the following keys: | |
* | |
* - operation: one of the operations in the switch statement below | |
* - tableName: required for operations that interact with DynamoDB |
This file contains hidden or 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
<div class="question"> | |
<div class="q-no">42. </div> | |
<div class="q-text">When the charge is reversed in a neuron during an action potential it is called</div> | |
<div class="answers"> | |
<div class="answer"> | |
<span class="answer-hole"></span> | |
<div class="opt">a)</div> | |
<div class="option">Polarization</div> | |
</div> | |
<div class="answer"> |
OlderNewer