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
#!/usr/bin/env ruby | |
# Written by Kieran P | |
# http://github.com/KieranP | |
# http://twitter.com/k776 | |
# http://k776.tumblr.com | |
# | |
# Feel free to fork and modify. | |
# If you do, send me a message on | |
# Github details changes and I'll |
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 'rubygems' | |
require 'spec' | |
require 'spec/autorun' | |
require 'capybara' | |
require 'capybara/dsl' | |
Capybara.app = proc { |env| [200, {}, "Hello World"]} | |
Spec::Runner.configure do |config| | |
config.include Capybara |
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 'rack/test' | |
require 'webrat' | |
require File.expand_path(File.dirname(__FILE__) + '/../../lib/stats') | |
Webrat.configure do |config| | |
config.mode = :rack | |
end | |
Stats::App.set :environment, 'cucumber' | |
Stats::App.enable :raise_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
#!/usr/bin/env ruby | |
# Written by Kieran P | |
# http://github.com/KieranP | |
# http://twitter.com/k776 | |
# http://k776.tumblr.com | |
# | |
# Feel free to fork and modify. | |
# If you do, send me a message on | |
# Github details changes and I'll |
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
#!/usr/bin/env ruby | |
# Written by Kieran P | |
# http://github.com/KieranP | |
# http://twitter.com/k776 | |
# http://k776.tumblr.com | |
# | |
# Feel free to fork and modify. | |
# If you do, send me a message on | |
# Github details changes and I'll |
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
#!/usr/bin/env ruby | |
# Written by Kieran P | |
# http://github.com/KieranP | |
# http://twitter.com/k776 | |
# http://k776.tumblr.com | |
# | |
# Feel free to fork and modify. | |
# If you do, send me a message on | |
# Github details changes and I'll |
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
Cucumber is a Integration test harness, so your features should be | |
specifying who can authenticate via what URLs and your steps should be | |
exercising the controllers an filters that enforce those features. | |
The point being, you should be going through your views and hitting | |
the database, checking to see if the http response body contains what | |
you expect to see and not worrying about directly testing authlogic | |
itself. | |
# Authentication.feature |
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
set :user, "deploy" | |
set :deploy_to, "/usr/local/www/nb_blog_jekyll" | |
set :jekyll_command, "/usr/local/jekyll/bin/jekyll --lsi" | |
role :web, "blog.new-bamboo.co.uk" | |
task :deploy do | |
run "cd #{deploy_to}; git pull; #{jekyll_command}; exit 0" | |
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 'active_support' | |
def ok_failed(condition) | |
if (condition) | |
puts "OK" | |
else | |
puts "FAILED" | |
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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
set :application, "host.name" | |
set :domain, "host.name" | |
set :repository, "[email protected]:user/jekyll-blog.git" | |
set :use_sudo, false | |
set :deploy_to, "/var/www/#{application}" | |
ssh_options[:forward_agent] = true | |
default_run_options[:pty] = true | |