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
When /^I wait until "([^"]*)" is visible$/ do |selector| | |
page.has_css?("#{selector}", :visible => true) | |
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
Add this to the Gemfile and Cucumber takes care of the rest. | |
gem 'thin', :group => :test |
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
[@1.9.2@factory_girl_rails ][msgehard@localhost:factory_girl_rails(master)]$ rake --trace | |
(in /Users/msgehard/Documents/Development/rubyDevelopment/gems_source/factory_girl_rails) | |
** Invoke default (first_time) | |
** Invoke cucumber (first_time) | |
** Execute cucumber | |
bundle exec /Users/msgehard/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -I "/Users/msgehard/.rvm/gems/ruby-1.9.2-p0@factory_girl_rails/gems/cucumber-0.8.5/lib:lib" "/Users/msgehard/.rvm/gems/ruby-1.9.2-p0@factory_girl_rails/gems/cucumber-0.8.5/bin/cucumber" --format progress | |
Using the default profile... | |
$ /Users/msgehard/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -S rails new test_app |
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
Online Regular expression tool | |
www.rubular.com | |
Ruby Yard Documentation | |
www.rubydoc.info | |
Explanation of Ruby Syntax | |
http://explainruby.net/ | |
Katas/Training |
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
Use capybara-firebug |
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
VCR (recording and playing back web service calls) | |
http://github.com/myronmarston/vcr | |
Pusher (WebSockets made easy) | |
http://www.pusherapp.com/ | |
http://www.rubyinside.com/pusher-websocket-service-3246.html |
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
Almond Milk Recipe from Rawsome! by Brigette Mars | |
1 cup almonds, soaked overnight, then rinsed | |
1 quart water | |
Honey (or anything else you care to add) to taste | |
Combine all ingredients in a blender and liquify. | |
Strain through a nut milk bag or sprout bag. I had a hard time finding either in Boulder (go figure) so I just used an old, clean pantyhose. | |
Store in the refrigerator. Lasts about a week. |
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
Before('@omniauth_test') do | |
OmniAuth.config.test_mode = true | |
# the symbol passed to mock_auth is the same as the name of the provider set up in the initializer | |
OmniAuth.config.mock_auth[:google] = { | |
"provider"=>"google", | |
"uid"=>"http://xxxx.com/openid?id=118181138998978630963", | |
"user_info"=>{"email"=>"[email protected]", "first_name"=>"Test", "last_name"=>"User", "name"=>"Test User"} | |
} | |
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
# adapted from rspec-rails http://github.com/rspec/rspec-rails/blob/master/spec/rspec/rails/mocks/mock_model_spec.rb | |
# put this in a file in your spec/support directory | |
# USAGE: | |
# | |
# let(:model) { ModelUnderTest.new(params) } | |
# it_behaves_like "ActiveModel" | |
shared_examples_for "ActiveModel" do | |
require 'test/unit/assertions' | |
require 'active_model/lint' |
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
# We need this to fix the random timeout error that we were seeing in CI. | |
# May be related to: http://code.google.com/p/selenium/issues/detail?id=1439 | |
Capybara.register_driver :selenium_with_long_timeout do |app| | |
client = Selenium::WebDriver::Remote::Http::Default.new | |
client.timeout = 120 | |
Capybara::Driver::Selenium.new(app, :browser => :firefox, :http_client => client) | |
end | |
Capybara.javascript_driver = :selenium_with_long_timeout |
OlderNewer