Displaying 7 results from an estimated 7 matches for "posts_controller_spec".
2007 May 30
18
autotest and rspec_on_rails not happy
Hi,
I''ve been using the rspec and rspec_on_rails plugins quite happily on
my Rails project for a while now. Today I noticed the autotest
support in RSpec-1.0.3 and decided to give that a spin.
Oh tragedy!
$ autotest
loading autotest/rails_rspec
./vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb:33:in
`initialize'': undefined method `singularize''
2010 Aug 30
1
undefined method `route_for' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:
...his error with my rspec - controller - test, and
yes, I do found the thread with the same error here, but it isn''t
helped me, think it''s not my case.
i have rails -v = Rails 3.0.0.rc, rspec -v = 2.0.0.beta.18 (hope they
should match each other).
my test is here: spec/controllers/posts_controller_spec.rb and i ran
it with command: rspec spec/controllers/posts_controller_spec.rb.
after all, test is:
require ''spec_helper''
describe PostsController do
render_views
describe "route generation" do
it "should be successful" do
@post = Post.new(:tit...
2012 May 23
1
received unexpected message :id= with (20)
...t: {title: ''New post'',
Mock Post(id: integer, title: string, description: text,
location: string, created_at: datetime, updated_at: datetime, status:
string, tags: string, views: integer, user_id: integer) received
unexpected message :id= with (20)
# ./spec/controllers/posts_controller_spec.rb:56:in `block (4
levels) in <top (required)>''
Finished in 0.59991 seconds
6 examples, 1 failure
I''m trying to figure out this for about a week or more :(
Attachments:
http://www.ruby-forum.com/attachment/7429/posts_controller_spec.rb
http://www.ruby-forum.com/attachme...
2007 May 31
16
Could anyone please help with rspec/nested resource behavior checking?
My problem has been listed here:
http://railsforum.com/viewtopic.php?pid=25439#p25439
Don''t think it would be required to completely re-type it here :)
Thanks!
--
-Daniel Fischer
http://danielfischer.com - Geek Blog
http://abigfisch.com - Portfolio
http://writersbeat.com - Writing Community
2012 Feb 07
6
nested route not receiving :id parameter within controller spec
...e, :id => @post.id
end
# ... etc
And... It blows up!
Failures:
1) PostsController#share shares
Failure/Error: post :share
ActionController::RoutingError:
No route matches {:controller=>"posts", :action=>"share"}
# ./spec/controllers/posts_controller_spec.rb:7
My routes has:
resources :posts do
post :share, :on => :member
end
rake routes shows:
share_post POST /posts/:id/share(.:format) {:action=>"share", :controller=>"posts"}
...
Why is it ignoring the :id parameter in my test and therefore blowing up?...
2007 May 24
3
Annoying problem, stack error
...or/plugins/rspec/bin/spec:3
rake aborted!
Command ruby -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"
&qu...
2007 May 10
12
shared descriptions -- a couple of issues
Hello All,
I''ve just upgraded to rspec/rspec_on_rails 0.9.3 and am very excited
about shared descriptions. They couldn''t have come at a better time: I
just finished refactoring some REST controllers so that the bulk of
the actions are inherited from a superclass. Now I can write the
specs once, too. :)
I''ve hit a couple of snags, though. I thought I''d