Skip to content

Instantly share code, notes, and snippets.

View ch1ago's full-sized avatar
🏠
Working mostly from home since 2006

Thiago Almeida ch1ago

🏠
Working mostly from home since 2006
  • Mexico City
  • 06:27 (UTC -06:00)
View GitHub Profile
GIT
remote: git://github.com/tchandy/octopus.git
revision: f3410d73889469a1456dc0c72b7f6942653e2d31
specs:
ar-octopus (0.4.0)
activerecord (>= 2.3.0)
GEM
remote: http://rubygems.org/
specs:
Failed examples:
rspec ./spec/controllers/users_controller_spec.rb:96 # UsersController POST create with invalid params re-renders the 'new' template
rspec ./spec/controllers/users_controller_spec.rb:139 # UsersController PUT update with invalid params re-renders the 'edit' template
Running: spec/controllers/users_controller_spec.rb spec/routing/users_routing_spec.rb
........F....F.........
Failures:
1) UsersController POST create with invalid params re-renders the 'new' template
require 'spec_helper'
describe "Session" do
describe "GET /auth/facebook and /session/create (same as /auth/facebook/callback)" do
it "triggers callback, creates Bob and redirects to root" do
expect do
get '/auth/facebook'
end.to change(User, :count).by(1) && change(Login, :count).by(1)
response.status.should be(200)
require 'spec_helper'
# This spec was generated by rspec-rails when you ran the scaffold generator.
# It demonstrates how one might use RSpec to specify the controller code that
# was generated by Rails when you ran the scaffold generator.
#
# It assumes that the implementation code is generated by the rails scaffold
# generator. If you are using any extension libraries to generate different
# controller code, this generated spec may or may not pass.
#
this page https://github.com/rspec/rspec-rails
tells me to do this...
describe "events/show" do
it "displays the event location" do
assign(:event, stub_model(Event,
:location => "Chicago"
))
render
rendered.should contain("Chicago")
strange, I get this evil routing error in rspec, but the browser works fine
----------
routes.rb
get "home/user_school/:token" => "home#user_school", as: 'home_user_school'
require 'spec_helper'
describe 'Home' do
describe "GET /home/user" do
it "capybara: from login page until " do
Fabricate(:school)
# - creating user
require 'spec_helper'
describe "Session" do
describe "GET /auth/facebook" do
it "with capybara: triggers callback and creates Bob Example" do
Fabricate(:school)
# I'm a guest
visit home_index_path
hey...
$("a.fade-out-and-slide-up").click(function() {
$(this).fadeOut('fast', function() { $(this).slideUp('slow'); });
});
I want this to have a smooth, sequential behavior (not parallel).
how can I?
describe "GET index" do
=begin
it "assigns all posts as @posts" do
get :index, {}, valid_session
assigns(:posts).should eq([@post])
end
=end
end