Skip to content

Instantly share code, notes, and snippets.

View johnbender's full-sized avatar

John Bender johnbender

View GitHub Profile
// THE BAD
public class Lamp
{
private int bulbAge;
private String bulbType;
private int shadeAge;
public Lamp(int bulbAge, String bulbType, int shadeAge)
{
this.bulbAge = bulbAge;
def solve
is_solution = @board.partial_solution?(Board.from_hash(params[:solution]))
if is_solution
current_user.current_user_game_board.score!
else
current_user.current_user_game_board.missed_guess!
end
current_user.next_board!
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. For a detailed explanation
# and listing of configuration options, please check the documentation
# online.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "base"
# Enable chef
config.vm.provisioner = :chef_solo
before :all do
user = mock(Facebooker::User)
user.should_receive(:id).any_number_of_times.and_return(1)
friend = mock('friend')
friend.should_receive(:id).any_number_of_times.and_return(4800015)
user.should_receive(:friends).any_number_of_times.and_return([friend])
user.should_receive(:friends_with_this_app).any_number_of_times.and_return([friend])