Skip to content

Instantly share code, notes, and snippets.

@markfeedly
Created October 3, 2013 16:45
Show Gist options
  • Save markfeedly/6812995 to your computer and use it in GitHub Desktop.
Save markfeedly/6812995 to your computer and use it in GitHub Desktop.
Failures: 1) User pages edit page Failure/Error: let(:user) { FactoryGirl.create(:user) } ArgumentError: Factory not registered: user # ./spec/requests/user_pages_spec.rb:26:in `block (3 levels) in <top (required)>' # ./spec/requests/user_pages_spec.rb:27:in `block (3 levels) in <top (required)>'
require 'spec_helper'
describe "User pages" do
describe 'Sign up / registration' do
#let(:url){signup_path}
#let(:title){"| Sign up"}
#let(:content){"Sign up"}
#it_should_behave_like "Basic Page"
it 'should have a registration page' do
visit new_user_registration_path
page.should have_content('Sign up')
end
end
describe 'Sign in' do
it 'should have a sign in page' do
visit new_user_registration_path
page.should have_content('Password confirmation')
end
end
describe "edit" do
let(:user) { FactoryGirl.create(:user) }
before { visit edit_user_path(user) }
describe "page" do
it { should have_content("Update your profile") }
it { should have_title("Edit user") }
it { should have_link('change', href: 'http://gravatar.com/emails') }
end
describe "with invalid information" do
before { click_button "Save changes" }
it { should have_content('error') }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment