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
Feature: Updating an existing request | |
In order to change my mind about what I need | |
I want to be able to edit my Request | |
Background: | |
Given I am logged in with facebook | |
And I go to the new request page | |
And I fill in the following: | |
| I want | Dragon's Lair Arcade Game | | |
| for | 2000 | |
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
RSpec::Matchers.define :translate_to do |key, options| | |
match do |actual| | |
@expected = I18n.t(key, options) | |
@failure = nil | |
@failure ||= :bad_actual if actual.start_with?('translation missing:') | |
@failure ||= :bad_expected if @expected.start_with?('translation missing:') | |
@failure ||= :no_match if @expected != actual | |
@failure.nil? | |
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
~>curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: api.example.com" -H "Origin: https://www.example.com" https://api.example.com/socket | |
HTTP/2 301 | |
date: Tue, 26 Jun 2018 02:27:07 GMT | |
content-type: application/json | |
content-length: 4 | |
location: https://localhost:9999/localhost | |
server: restify | |
access-control-allow-origin: https://www.example.com | |
vary: origin | |
access-control-expose-headers: api-version, content-length, content-md5, content-type, date, request-id, response-time |
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
var Core = (function($) { | |
return { | |
modules: {}, | |
addModule: function(module_name, fn) { | |
// create new sandbox for module | |
var sandbox = new Sandbox(module_name); | |
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
describe OffersController do | |
def do_create | |
post :create, { :post_id => bb_request.id, :offer => new_offer.attributes } | |
end | |
shared_examples "an access controlled action" do |action_proc| | |
it "denies access if the post is not verified" do | |
expect(&action_proc).to raise_error(CanCan::AccessDenied) | |
end | |
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
## my routes file | |
resources :users do | |
get :redeem, :on => :member | |
end | |
I want to be able to do: | |
redeem_user_path(@user, @user.code) |
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
module Bar | |
end | |
class Foo | |
include Bar | |
end | |
puts Foo:CONS => Error | |
module Bar |
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
GEM | |
remote: http://rubygems.org/ | |
specs: | |
POpen4 (0.1.4) | |
Platform (>= 0.4.0) | |
open4 | |
Platform (0.4.0) | |
actionmailer (3.2.3) | |
actionpack (= 3.2.3) | |
mail (~> 2.4.4) |
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 Contact < ActiveRecord::Base | |
has_many :phones | |
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 CreateContacts < ActiveRecord::Migration | |
def self.up | |
create_table :contacts do |t| | |
t.string :first_name | |
t.string :last_name | |
t.timestamps | |
end | |
end |
NewerOlder