Displaying 20 results from an estimated 20 matches for "users_controller_spec".
2008 Jun 04
5
controller filters running twice in 1.1.4?
...hat my filter actions initiated from application.rb
seem to be running twice. I created a test rails project with the rspec
scaffold and am also seeing the same behavior here too.
Adding this code to application.rb:
before_filter :foo
def foo
"foo"
end
and an example in users_controller_spec.rb:
it "should call foo via a before filter" do
controller.should_receive(:foo)
do_get
end
results in this:
1)
Spec::Mocks::MockExpectationError in ''UsersController handling GET
/users.xml should call foo''
Mock ''UsersController'' e...
2007 May 26
11
RSpec
...sers/multimedia/Desktop/restful_auth_rspec/vendor/plugins/rspec/lib"
"/Users/multimedia/Desktop/restful_auth_rspec/vendor/plugins/rspec/bin/spec"
"spec/controllers/session_controller_spec.rb"
"spec/controllers/user_assets_controller_spec.rb"
"spec/controllers/users_controller_spec.rb"
"spec/helpers/user_assets_helper_spec.rb"
"spec/helpers/user_assets_url_helpers_spec.rb" "spec/models/asset_spec.rb"
"spec/models/authenticated_base_spec.rb" "spec/models/user_spec.rb"
"spec/views/assets/edit_rhtml_spec.rb"
"...
2007 Aug 07
4
Problems with raising errors on a mocked object
I''m trying to mock a object to raise a certain error. By doing so I
get a ArgumentError on ActiveRecord''s save! method:
http://pastie.caboo.se/85628
I''ve tried to debug it but just can''t seem to find what I''m doing
wrong. Any help is greatly appreciated.
Cheers,
Eivind Uggedal
2011 Jul 19
0
Ruby on Rails Tutorial Chapter 8 Signup Success
...essful creation" in the User controller however I get the
following two errors:
1) UsersController POST ''create'' success should create a user
Failure/Error: lambda do
count should have been changed by 1, but was changed by 0
# ./spec/controllers/users_controller_spec.rb:95:in `block (4
levels) in <top (required)>''
2) UsersController POST ''create'' success should redirect to the
user show page
Failure/Error: response.should
redirect_to(user_path(assigns(:user)))
ActionController::RoutingError:
No ro...
2008 Apr 03
1
Anyone experienced RSpec/Autotest forgetting models?
Hi
Saving a controller spec frequently gives me this error:
52)
LoadError in ''UsersController GET /users with basic request params should
find all the user types''
Expected /home/amoran/Documents/becta/apps/Backend/app/models/user_type.rb
to define UserType
./spec/controllers/users_controller_spec.rb:299:
script/spec:4:
I have to Ctrl-C autotest before it will load again.
Anyone else seen this? Is it a known issue? I am on trunk r3333.
Thanks
Ashley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/2008...
2007 May 24
3
Annoying problem, stack error
...-I"/Users/sparta/Projects/work/idastudios/ff/vendor/plugins/rspec/lib"
"/Users/sparta/Projects/work/idastudios/ff/vendor/plugins/rspec/bin/spec"
"spec/controllers/comments_controller_spec.rb"
"spec/controllers/posts_controller_spec.rb"
"spec/controllers/users_controller_spec.rb"
"spec/models/asset_spec.rb" "spec/models/category_spec.rb"
"spec/models/comment_spec.rb" "spec/models/message_spec.rb"
"spec/models/post_spec.rb" "spec/models/user_spec.rb"
"spec/models/vote_spec.rb" --options
"/Use...
2011 May 17
1
rails render_to_string problem
...nstance of Array. The error occurred while evaluating nil.[] # C:/
Users/makaroni4/free_frog/ffapi/app/views/users/_show.tokamak:1:in
_app_views_users__show_tokamak___509498818 _32151168_368311673'' # C:/
Users/makaroni4/XXX/XXX/app/controllers/users_controller.rb:22:in
update'' # ./users_controller_spec.rb:34:in `block (4 levels) in ''
So may be I call render_to_string method wrong?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@publ...
2012 Nov 06
2
rspec failure upon revisit
.... I''m using Ruby on Rails 3 Tutorial - Learn Rails by
Example by Michael Hartl.
After rebooting my server I ran an rspec spec/ command to check to see
if there were any problems and this is what I received. I didn''t modify
anything except I did overwrite users_controller.rb and
users_controller_spec.rb when starting another chapter of the tutorial.
I''m not sure what changed.
I''m having trouble diagnosing the error:
Pending:
UsersHelper add some examples to (or delete)
/Users/andrewchickedantz/rails_projects/sample_app/spec/helpers/users_helper_spec.rb
# No reason give...
2008 Sep 14
2
rake spec:rcov => [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32]
...- "spec/controllers/access_control_spec.rb" "spec/
controllers/authenticated_system_spec.rb" "spec/controllers/
blogs_controller_spec.rb" "spec/controllers/blogs_routing_spec.rb"
"spec/controllers/sessions_controller_spec.rb" "spec/controllers/
users_controller_spec.rb" "spec/helpers/blogs_helper_spec.rb" "spec/
helpers/users_helper_spec.rb" "spec/models/blog_spec.rb" "spec/models/
user_spec.rb" "spec/views/blogs/edit.html.erb_spec.rb" "spec/views/
blogs/index.html.erb_spec.rb" "spec/views/b...
2008 Oct 20
5
RSpec-Rails bug with to_xml?
...mail</email>\n <id type=\"integer\">953125641</id>\n
<name>Name</name>\n <updated-at
type=\"datetime\">2008-10-20T11:24:28Z</updated-at>\n
</user>\n</users>\n",
got: " " (using ==)
./spec/controllers/users_controller_spec.rb:10:
/usr/lib64/ruby/1.8/timeout.rb:53:in `timeout''
Finished in 0.256981 seconds
This happens both when using "rake spec" and when running only that
spec file. Firing up the app and accessing localhost:3000/users.xml
returns the correct result. In the "real" projec...
2007 Apr 09
7
RCov results seem to include the spec files
...c,config\/boot.rb -o "coverage"
"/usr/local/lib/ruby/gems/1.8/gems/rspec-0.8.2/bin/spec" --
"spec/controllers/books_controller_spec.rb"
"spec/controllers/feedback_controller_spec.rb"
"spec/controllers/stack_controller_spec.rb"
"spec/controllers/users_controller_spec.rb"
"spec/helpers/books_helper_spec.rb" "spec/models/book_spec.rb"
"spec/models/user_spec.rb"
rspec 0.8.2, rcov 0.8.0.2
I noticed that the example output at
http://rspec.rubyforge.org/coverage/index.html doesn''t seem to share
this. So how can I make rc...
2010 Sep 22
1
Bundler picking up wrong version of Ruby with Rails 3 ( possible bundler bug )
...uff.
I am facing problems getting autotest to run.
Here''s the trace:
% autotest
loading autotest/rails_rspec2
bundle exec
/Users/manish/Foo/Foo-Server/jruby-1.5.2/lib/ruby/gems/1.8/gems/rspec-core-2.0.0.beta.22/bin/rspec
''/Users/manish/Foo/Foo-Server/FooInsight/spec/controllers/users_controller_spec.rb''
''/Users/manish/Foo/Foo-Server/FooInsight/spec/helpers/home_helper_spec.rb''
''/Users/manish/Foo/Foo-Server/FooInsight/spec/helpers/install_helper_spec.rb''
''/Users/manish/Foo/Foo-Server/FooInsight/spec/models/user_spec.rb''
*
/System/Li...
2010 Sep 01
1
Faking Paperclip has_attached_file with Factory girl?
...|
user.name "Anders"
user.email "user-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org"
user.password "foobar"
user.password_confirmation "foobar"
user.avatar_file_name "avatar"
end
My Rspec test (users_controller_spec.rb) looks like this:
it "should have a profile image" do
get :show, :id => @user
should have_attached_file(:avatar)
end
And I get the following error:
UsersController GET ''show'' should have a profile image
Failure/Error: @user = Factory(:user)
undefined method...
2007 Jul 14
8
Specing Layouts
Hi,
I''ve just started to try and spec my application.html.erb layout as one of
the view specs but it totally barfs.
I''m guessing that it''s due to the yield statements in the layout.
Any clues as to how to proceed?
Cheers
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2013 Oct 08
1
Trouble with rspec and FactoryGirl Sequence
...ies.rb looks like:
FactoryGirl.define do
factory :user do
name "John Smith"
sequence :email do |n|
"person-#{n}@factory.com"
end
password "foobar"
password_confirmation "foobar"
end
end
Here''s the relevant section of my users_controller_spec.rb:
require ''spec_helper''
describe UsersController do
.
.
describe "GET ''index''" do
.
.
describe "for signed-in users" do
before(:each) do
@user = test_sign_in(FactoryGirl.create(:user))...
2007 Nov 18
9
Not sure why this is failing
...])
What am I doing wrong?
Thanks for the help.
Here is the error message:
Spec::Mocks::MockExpectationError in ''UsersController handling POST
/users should create a new user''
Mock ''Class'' expected :new with ({}) once, but received it 0 times
./spec/controllers/users_controller_spec.rb:245:
script/spec:4:
###################################
describe UsersController, "handling POST /users" do
before do
@address = mock_model(Address, :to_param => "1")
@user = mock_model(User, :to_param => "1", :address => @address,
:address= =&...
2011 Jul 25
6
What does using a lambda in rspec tests accomplish?
...this rror:
Failures:
1) UsersController Post create failure should not create a user
Failure/Error: response.should_not change(User, :count)
NoMethodError:
undefined method `call'' for
#<ActionController::TestResponse:0x00000100f3d3a0>
# ./spec/controllers/users_controller_spec.rb:62:in `block (4
levels) in <top (required)>''
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocF...
2010 Mar 22
0
rspec bug, on Mysql::Error: MySQL server has gone away: ROLLBACK TO SAVEPOINT active_record_1
...ec/models/mail_reader_on_tasks_with_workspace_spec.rb"
"spec/helpers/users_helper_spec.rb" "spec/lib/task_string_pattern_spec.rb"
"spec/lib/task_question_answer_string_pattern_spec.rb"
"spec/controllers/sessions_controller_spec.rb"
"spec/controllers/users_controller_spec.rb"
"spec/controllers/tasks_controller_spec.rb"
"spec/controllers/workspace_with_workflow_tasks_controller_spec.rb"
"spec/controllers/workspace_tasks_controller_spec.rb" --options
"/home/poldz/projects/ruby/wruwo/spec/spec.opts" failed
(See full trace b...
2008 Mar 06
0
rake spec aborting
...o/vendor/plugins/rspec/lib"
"/Users/oliver/Sites/portfolio/vendor/plugins/rspec/bin/spec"
"spec/controllers/categories_controller_spec.rb"
"spec/controllers/categories_routing_spec.rb"
"spec/controllers/sessions_controller_spec.rb"
"spec/controllers/users_controller_spec.rb"
"spec/controllers/works_controller_spec.rb"
"spec/controllers/works_routing_spec.rb"
"spec/helpers/categories_helper_spec.rb"
"spec/helpers/works_helper_spec.rb" "spec/models/category_spec.rb"
"spec/models/image_spec.rb" "spe...
2011 Jul 05
4
Problem of "rake spec"
Hi all,
I am a bit confused when i type rake spec and it gives me this
message,
No examples matching ./spec/**/*_spec.rb could be found
what is that mean that something is not found.
and where i can input my the test code because i did have a tiny
sample code in user_controller_test.rb.
is that the right place to test functional..
plz give me a help
thanks
--
You received this message