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
#Put this inside ~/.bash_profile | |
#Function for lazy git commiting. | |
#Instead of: git commit -m "some message" | |
#Type: gci some message | |
gci() { | |
if [ -z "$1" ] # Is parameter #1 zero length? | |
then | |
echo "You must pass a commit message like this: gci some message here - which then becomes: git commit -m 'some message here'" | |
else | |
git commit -m "$*" |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'blather/client' | |
setup '[email protected]', 'moderator' | |
message :chat? do |m| | |
puts m.read_content(:meeting) | |
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
class Category < ActiveRecord::Base | |
has_many :assignments, :foreign_key => 'category_uuid', :primary_key => 'uuid' | |
end | |
class Post < ActiveRecord::Base | |
has_many :assignments, :foreign_key => 'post_uuid', :primary_key => 'uuid' | |
end | |
class Assignment < ActiveRecord::Base | |
belongs_to :post, :foreign_key => 'uuid', :primary_key => 'post_uuid' |
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
#relevant lines in features/support/env.rb | |
Capybara.default_selector = :css | |
Capybara.javascript_driver = :culerity | |
Capybara.ignore_hidden_elements = true | |
#features/hidden_text_testing.feature | |
@javascript | |
Scenario: Testing test hidden via inline style with 'should not see' | |
When I visit the the public index.html page | |
Then I should not see "Hidden Via Comment" |
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
### IMPORTANT NOTE: See the comment thread below for a more concise way to determine this now, using has_css... | |
#A better 'I should not see' for Capybara that lets jQuery determine visibility of the text you're looking for. | |
Then /^"([^\"]*)" should not be visible$/ do |text| | |
finder_script = %{ | |
function is_text_visible_on_page(text) { | |
var match = false; | |
$('*:visible') |
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
LabelForNestedStories AnotherLabel | |
- Feature title (single line description in parens) | |
- Some other feature (you don't need blank lines seperating your stories but you can use them for extra readability in the file) | |
- Another feature | |
Multi-line description of this feature. | |
Use two tabs to indent for easy visual parsing. | |
[] Chores look like checkboxes (short description in parens) |
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
grammar PivotalStories | |
rule stories | |
story* | |
end | |
rule story | |
feature* | |
end | |
rule feature |
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
LabelOne LabelTwo | |
- feature one (description one) | |
- feature two (description two) | |
- feature three with multiline desc following | |
desc line 1 | |
desc line 2 | |
desc line 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
Autotest.add_hook :initialize do |at| | |
at.add_mapping(%r%^spec/integration/.*_spec.rb$%, true) { |filename, _| | |
filename | |
} | |
at.add_mapping(%r%^app/(models|controllers|helpers|lib)/.*rb$%, true) { | |
at.files_matching %r%^spec/integration/.*_spec.rb$% | |
} | |
at.add_mapping(%r%^app/views/(.*)$%, true) { |
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
> Number.prototype.seconds = function(){ return this * 1000 } | |
=> function (){ return this * 1000 } | |
> 1..seconds() | |
=> 1000 | |
> (1).seconds() | |
=> 1000 | |
> 1['seconds']() |
OlderNewer