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
### trying to merge trunk -> project | |
Conflict adding files to features. Created directory. | |
Conflict because features is not versioned, but has versioned children. Versioned directory. | |
Conflict adding file features. Moved existing file to features.moved. | |
Conflict adding files to features/either. Created directory. | |
Conflict because features/either is not versioned, but has versioned children. Versioned directory. | |
Conflict adding files to features/step_definitions. Created directory. | |
Conflict because features/step_definitions is not versioned, but has versioned children. Versioned directory. | |
Contents conflict in features/step_definitions/user_steps.rb |
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
$ ruby --version | |
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux] | |
$ irb | |
irb(main):001:0> require 'date' | |
=> true | |
irb(main):002:0> Date.civil_to_jd(2004,10,20) | |
=> 248812494 | |
irb(main):003:0> Date.jd_to_civil(Date.civil_to_jd(2004,10,20)) | |
=> [2096, -1, 5731] |
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
## Loosen webrat's field label matching regexp | |
module Webrat | |
module Locators | |
class FieldLabeledLocator < Locator | |
def matching_label_elements_with_numbering | |
label_elements.select do |label_element| | |
text(label_element) =~ /^.*#{Regexp.escape(@value.to_s)}.*$/i | |
end | |
end |
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
require 'spec/runner/formatter/specdoc_formatter' | |
class FindEvilExamplesFormatter < Spec::Runner::Formatter::SpecdocFormatter | |
def example_failed(*args) | |
warn_if_users_still_exist | |
super | |
end | |
def example_passed(*args) | |
warn_if_users_still_exist |
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
"""Run a command before allowing a commit.""" | |
import sys | |
import os | |
import re | |
import pprint | |
from bzrlib import ( | |
branch, | |
errors, |
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
Date: Thu, 3 Sep 2009 11:55:42 -0500 | |
From: David Chelimsky <[email protected]> | |
To: "Hinze, Paul T" <[email protected]> | |
Subject: WindyCityRails 2009 - PM Tutorial Information | |
Reply-To: "[email protected]" <[email protected]> | |
Thanks for registering for Behaviour Driven Rails with RSpec and Cucumber, the PM tutorial at WindyCityRails 2009! This tutorial will begin immediately following lunch, running from 1:00pm to 3:45pm. | |
This is a hands on, skills development workshop, so please bring your laptops and be ready to write some code. While attendees are not expected to be experts with any of these tools and techniques, you are expected to have at least a basic working knowledge of Ruby, Ruby on Rails, RSpec, and Cucumber. |
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
## app/models/person.rb | |
class Person < ActiveRecord::Base | |
has_many :pets | |
end | |
## app/models/pet.rb | |
class Pet < ActiveRecord::Base | |
belongs_to :person |
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
it "should work with textareas and new lines" do | |
with_html <<-HTML | |
<html> | |
<form method="post" action="/login"> | |
<label for="user_text">User Text</label> | |
<textarea id="user_text" name="user[text]"></textarea> | |
<input type="submit" /> | |
</form> | |
</html> | |
HTML |
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
spec_acts_as_plugin(:acts_as_billable) do |plugin| | |
plugin.should require_methods( | |
:billable_amount, | |
:billable_description, | |
:billable_type, | |
:billable_user, | |
:billable_mfk | |
) | |
plugin.should define_methods( |
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
class Version | |
named_scope :as_of, lambda { |a_certain_time| | |
effkay = original_class.versioned_foreign_key | |
{ :conditions => [ | |
"#{table_name}.version = ( | |
SELECT MAX(vtn.version) | |
FROM #{table_name} AS vtn | |
WHERE vtn.#{effkay} = #{table_name}.#{effkay} | |
AND vtn.updated_at <= ? | |
)", a_certain_time.to_s(:db) ] } |