Skip to content

Instantly share code, notes, and snippets.

View samflores's full-sized avatar
🦕

Samuel Flores samflores

🦕
View GitHub Profile
@samflores
samflores / remarkable_way.rb
Created April 13, 2009 20:51 — forked from josevalim/remarkable_way.rb
Remarkable X RSpec
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe FeedbacksController do
mock_models :feedback
describe :get => :new, :id => '42' do
expects :new, :on => Feedback, :returns => mock_feedback
should_assign_to :feedback, :with => mock_feedback
end
@samflores
samflores / main.rb
Last active August 29, 2015 14:03 — forked from anonymous/main.rb
require 'amazing_redis_queue'
require 'worker'
AmazingRedisQueue.subscribe 'nome_da_fila', MyWorker
AmazingRedisQueue.publish 'nome_da_fila', 'parametro'
@samflores
samflores / user.rb
Last active August 29, 2015 14:06 — forked from dannluciano/user.rb
class User < ActiveRecord::Base
validates :username, presence: :true
validates :password_digest, presence: :true
has_secure_password
end