Access it via:
"*
Paste:
"*p
Copy line:
"*Y
Run Cucumber features features/admin_deletes_an_event.feature features/admin_deletes_an_event.feature:7 | |
ERROR: Guard::Cucumber failed to achieve its <run_on_change>, exception was: | |
Errno::ENOENT: No such file or directory - features/admin_deletes_an_event.feature:7 | |
/Users/dev/.Guardfile:92:in `read' | |
/Users/dev/.Guardfile:92:in `block in cucumber_command' | |
/Users/dev/.Guardfile:91:in `each' | |
/Users/dev/.Guardfile:91:in `any?' | |
/Users/dev/.Guardfile:91:in `cucumber_command' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p136@hr_2011/gems/guard-cucumber-0.7.2/lib/guard/cucumber/runner.rb:24:in `run' | |
/Users/dev/.rvm/gems/ruby-1.9.2-p136@hr_2011/gems/guard-cucumber-0.7.2/lib/guard/cucumber.rb:85:in `run_on_change' |
RSpec::Matchers.define :have_country do |expected| | |
match do |actual| | |
# usage: | |
# field_labeled('Select your address').should have_option("Home Address") | |
RSpec::Matchers.define :have_option do |expected| | |
def options_for(select_field) | |
select_field.all('option').map &:text | |
end | |
match do |select_field| |
require 'spec_helper' | |
describe Candidate do | |
subject { Fabricate(:candidate, first_name: "Joe", last_name: "Doe") } | |
describe "#full_name" do | |
its(:full_name) { should == "Joe Doe" } | |
end | |
describe "#search" do |
require 'ostruct' | |
module ApplicationHelper | |
def pluralize(*args, &blk) | |
result = super | |
if block_given? | |
count, *text = result.split | |
yield OpenStruct.new(text: text.join(' '), count: count) | |
nil | |
else |
describe DonorsChoose do | |
describe "requesting data" do | |
let(:test_title) { "A test project" } | |
def mock_request(args) | |
request = double(:fetch => %Q/{"proposals": [{"title": "#{test_title}"}]}/) | |
DonorsChoose::Request.should_receive(:new).with(args).and_return(request) | |
end | |
context "via lat & lng" do |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
bind r source-file ~/.tmux.conf |
class Controller | |
expose(:person) { PersonView.new(Person.first, self) } | |
end | |
class Decorator | |
attr_reader :controller, :object | |
def initializer(object, controller) | |
@object, @controller = object, controller | |
end |
mod3 = ->(i) { (i % 3).zero? } | |
mod5 = ->(i) { (i % 5).zero? } | |
both = ->(i) { mod3[i] && mod5[i] } | |
rules = { | |
'FizzBuzz' => ->(i) { both[i] }, | |
'Fizz' => ->(i) { mod3[i] }, | |
'Buzz' => ->(i) { mod5[i] } | |
} |
towers = [[nil,4,3,2,1],[nil],[nil]] | |
valid = [[nil],[nil],[nil,4,3,2,1]] | |
moves = [] | |
record = ->(disc, from, to) { | |
names = { 0 => 'left ', 1 => 'center', 2 => 'right ' } | |
moves << "disc %s: %s -> %s" % [disc, names[from], names[to]] | |
} |