- The brewery application manages physical inventory, a library of beer recipes, and production of beer.
- The production system supervises the creation, movement and bottling of beer.
- Beer is made according to a recipe which specifies ingredients and amounts.
- Ingredients are mixed in a mixing vat to create a batch of beer. After a batch is mixed, it is moved to a fermenting vat, where readings of its specific gravity will be taken daily.
- While fermenting, beer temperature will be monitored and kept within a tolerance of the temperature as specified in a recipe.
- After it has finished fermenting, beer is moved to another vat to settle, then moved again to a bottling vat where it is bottled on an external bottling line.
- The brewery includes a network of interconnected pipes and vats, an inventory of ingredients, a collection of recipes, and batches of beer both in production and already bottled.
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/autorun' | |
class Foo | |
attr_accessor :a | |
def initialize | |
@a = :unchanged | |
end | |
# call 'a' with explicit 'self' as receiver |
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
describe 'stuff' do | |
[1,2,3,4].each do |n| | |
it n do | |
expect(n).to be < 5 | |
end | |
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
Feature: Summing numbers | |
In order to understand the gherkin syntax | |
As someone new to cucumber | |
I want a simple example | |
Scenario: Summing two positive numbers | |
Given the first number is 1 | |
And the second number is 2 | |
When I sum the numbers | |
Then the answer is 3 |
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
# Fill in the values after # => | |
# | |
$title = "Ruby Variables" | |
@subtitle = "Where do they come from?" | |
presenter = "@tooky" | |
class Presentation | |
@@length = "10 min" | |
@style = "Code" |
- Complete the ruby koans
- Use RSpec to test-drive a solution to either:
- Write a 10 minute presentation about the topic card you pick
- BONUS: clone Corey Haines' [practice repo] [1], and use it to help you complete a Game of Life solution.
- You will need to research [cucumber] [2] and [bundler] [3]
- Use cucumber and rspec to help guide your code
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' | |
module Cucumber | |
module MiniTestAssertions | |
def self.extended(base) | |
base.extend(MiniTest::Assertions) | |
base.assertions = 0 | |
end | |
attr_accessor :assertions | |
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
module MiniTestAssertions | |
def self.extended(base) | |
base.extend(MiniTest::Assertions) | |
end | |
attr_accessor :assertions | |
end | |
World(MiniTestAssertions) # this will work | |
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 'heavies_publish' | |
require 'launchy' | |
desc 'Publish the site' | |
task :publish => 'publish:publish' | |
namespace :publish do | |
include Heavies::Publish | |
directory Heavies::Publish.dir |
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
% VIEW_OTHER_WARNINGS=true rake ~cucumber/cucumber-ruby-core (master) | |
/opt/rubies/ruby-1.9.3-p392/bin/ruby -w -r./capture_warnings -S rspec ./spec/cucumber/core/ast/background_spec.rb ./spec/cucumber/core/ast/doc_string_spec.rb ./spec/cucumber/core/ast/examples_table_spec.rb ./spec/cucumber/core/ast/outline_step_spec.rb ./spec/cucumber/core/ast/step_spec.rb ./spec/cucumber/core/ast/table_spec.rb ./spec/cucumber/core/compiler_spec.rb ./spec/cucumber/core/gherkin/parser_spec.rb ./spec/cucumber/core/gherkin/writer_spec.rb ./spec/cucumber/core/test/case_spec.rb ./spec/cucumber/core/test/result_spec.rb ./spec/cucumber/core/test/step_spec.rb ./spec/cucumber/core/test/suite_runner_spec.rb ./spec/cucumber/core_spec.rb ./spec/cucumber/initializer_spec.rb --color | |
...................................................................................................................... | |
------------------------------ other warnings: ------------------------------ | |
/U |