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
// 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; |
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 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! |
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
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 |
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
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]) | |