diff --git a/config/routes.rb b/config/routes.rb
index fd8dcdfce..65ca70dca 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,9 +1,9 @@
SampleApp::Application.routes.draw do
- scope as: 'jam_ruby' do
+ scope 'jam_ruby' do
#resources :jam_session_members
#resources :jam_sessions
- resources :users
+ resources :users, :as => nil
end
diff --git a/spec/factories.rb b/spec/factories.rb
index eafc46312..649e5259f 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -1,5 +1,5 @@
FactoryGirl.define do
- factory :user do
+ factory :user, :class => "JamRuby::User" do
sequence(:name) { |n| "Person #{n}" }
sequence(:email) { |n| "person_#{n}@example.com"}
password "foobar"
diff --git a/spec/requests/authentication_pages_spec.rb b/spec/requests/authentication_pages_spec.rb
index 21d1ec4d4..148e782e9 100644
--- a/spec/requests/authentication_pages_spec.rb
+++ b/spec/requests/authentication_pages_spec.rb
@@ -111,31 +111,6 @@ describe "Authentication" do
it { should have_selector('title', text: 'Sign in') }
end
end
-
- describe "in the Microposts controller" do
-
- describe "submitting to the create action" do
- before { post microposts_path }
- specify { response.should redirect_to(signin_url) }
- end
-
- describe "submitting to the destroy action" do
- before { delete micropost_path(FactoryGirl.create(:micropost)) }
- specify { response.should redirect_to(signin_url) }
- end
- end
-
- describe "in the Relationships controller" do
- describe "submitting to the create action" do
- before { post relationships_path }
- specify { response.should redirect_to(signin_url) }
- end
-
- describe "submitting to the destroy action" do
- before { delete relationship_path(1) }
- specify { response.should redirect_to(signin_url) }
- end
- end
end
describe "as wrong user" do
@@ -166,4 +141,4 @@ describe "Authentication" do
end
end
end
-end
\ No newline at end of file
+end
diff --git a/spec/requests/user_pages_spec.rb b/spec/requests/user_pages_spec.rb
index 64ce7bf20..4bbf78452 100644
--- a/spec/requests/user_pages_spec.rb
+++ b/spec/requests/user_pages_spec.rb
@@ -45,7 +45,7 @@ describe "User pages" do
end
describe "showing the second page" do
- before { visit users_path(page: 2) }
+ before { visit _users_path(page: 2) }
it "should list the second page of users" do
second_page.each do |user|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ce9db47b9..0232d68a7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -7,6 +7,8 @@ require 'active_record'
require 'jam_db'
require 'spec_db'
+include JamRuby
+
# recreate test database and migrate it
db_config = YAML::load(File.open('config/database.yml'))["test"]
SpecDb::recreate_database(db_config)