Skip to content

Instantly share code, notes, and snippets.

View manlycode's full-sized avatar

Chris Rittersdorf manlycode

  • Collective Idea
  • Grand Rapids, MI
View GitHub Profile
<script type="text/javascript" charset="UTF-8">
if (typeof tokens == 'undefined') tokens = new Object();
if (!tokens.digg) tokens.digg = new Object();
tokens.digg.perform = "1929e32b1cff8822e799406667440802";
if (!tokens.report) tokens.report = new Object();
tokens.report.store = "bb2b9eb56461138d8c497d78f0d177a0";
</script><div class="sidebar">
<div id="block_ad_msft" class="item_ad_image msad">
<script type="text/javascript">/* <![CDATA[ */
<script type="text/javascript" charset="UTF-8">
if (typeof tokens == 'undefined') tokens = new Object();
if (!tokens.digg) tokens.digg = new Object();
tokens.digg.perform = "1929e32b1cff8822e799406667440802";
if (!tokens.report) tokens.report = new Object();
tokens.report.store = "bb2b9eb56461138d8c497d78f0d177a0";
</script><div class="sidebar">
<div id="block_ad_msft" class="item_ad_image msad">
<script type="text/javascript">/* <![CDATA[ */
Drew, here is a gist.
#generate invite gets called from email_invite_with_template
def email_invite_with_template(template,params)
verification_mail = generate_invite
params[:login] ||= login.email
# create the attachment, if neede
if params[:include_optouts]
raise "request_report required parameter" unless params[:request_report]
raise "requests required parameter" unless params[:requests]
module WSDL
module XMLSchema
class SimpleType < Info
private
def check_restriction(value)
unless @restriction.valid?(value) || @name.to_s =~ /(enum_creative_third_party_types|enum_ym_numbers_difference)/
raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
end
end
end
module WSDL
module XMLSchema
class SimpleType < Info
private
def check_restriction(value)
unless @restriction.valid?(value) || @name.to_s =~ /(enum_creative_third_party_types|enum_ym_numbers_difference)/
raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
end
end
end
module WSDL
module XMLSchema
class SimpleType < Info
private
def check_restriction(value)
unless @restriction.valid?(value) || @name.to_s =~ /(enum_creative_third_party_types|enum_ym_numbers_difference)/
raise XSD::ValueSpaceError.new("#{@name}: cannot accept '#{value}'")
end
end
end
class FooController < ApplicationController
def index; render :text => "foos"; end
end
describe FooController do
describe ".require_user" do
it "should redirect to the login url" do
get :index
response.should redirect_to(login_url)
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format progress features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "#{rerun_opts} --format rerun --out rerun.txt --strict --tags ~@wip"
%>
default: <%= std_opts %>
wip: --tags @wip:3 --wip features
autospec-all: --require features --require lib --format progress features
autospec: --require features --require lib features
default: --format pretty --tags ~@integration
# at the bottom of your spec helper
def tag_as_integration
unless ENV['INTEGRATION'] == 'true'
pending
end
end
# at the top level describe of a spec you want to exclude from normal execution
before do
tag_as_integration