I hereby claim:
- I am david on github.
- I am ior3k (https://keybase.io/ior3k) on keybase.
- I have a public key ASBbodNQqd82cVPZDoWoCHsQmot1YntaLfvO6Yc6T-RzHQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'zeus/rails' | |
class CucumberPlan < Zeus::Rails | |
def cucumber_environment | |
require 'cucumber/rspec/disable_option_parser' | |
require 'cucumber/cli/main' | |
@cucumber_runtime = Cucumber::Runtime.new | |
end | |
def cucumber(argv=ARGV) |
Users need to sign up to use our app because [purpose]. We don't want to scare users with a long form though, so we'll simply ask for the minimum information. In our case that's the name, email and a password.
We don't ask users to confirm the password because they can easily reset it using the Forgot Password? link.
When a user signs up successfully, they will be sent to the dashboard. We will send them an email confirming the sign up.
Example: Successful signup
Given I am a visitor
module Assertions | |
def demand(&block) | |
block.call or raise ConditionFailed | |
end | |
def promise(&block) | |
tap { |o| yield o or raise ConditionFailed } | |
end | |
def refuse(&block) |
# admin/real_estate_companies.rb | |
ActiveAdmin.register RealEstateCompany do | |
form do |f| | |
f.inputs do | |
f.input :vendors, collection: Vendor.sorted_by_name | |
end | |
end | |
end | |
# models/vendor.rb |
class Outcome | |
HANDLER = "if_" | |
HANDLER_RX = /^#{HANDLER}/ | |
QUERY_RX = /\?$/ | |
def self.new(result, *args, &b) | |
super.tap { |o| yield o if block_given? } | |
end | |
def initialize(result, *args) |
class PersistentCollection | |
def initialize(klass) | |
@klass = klass | |
end | |
# ... | |
end | |
# This should be reusable | |
class ScopedCollection |
module MyMixin | |
def say_hello | |
"hello!" | |
end | |
end | |
Object.new.extend(MyMixin).say_hello #=> "hello!" |