[rspec-users] [rspec][webrat] Bug? in have_tag for

2009-07-06 Thread Evgeny Bogdanov
t;, :content => "Logout") If I put :href to be "/home2" or :content to be "Home1" the spec still passes, though it shouldn't as I understand. Does somebody know what I am doing wrong? Thank you in advance, Evgeny _

Re: [rspec-users] [rspec] How to pass route parameters to post method?

2009-06-05 Thread Evgeny Bogdanov
Hello Mike, Thank you for your hint. Obviously, it worked! Laughing at myself now: how post method was supposed to know what I mean by :viewtype if don't specify it :) Best, Evgeny On Jun 4, 10:14 pm, Mike Sassak wrote: > Hi Evgeny, > > You didn't include the error messag

[rspec-users] [rspec] How to pass route parameters to post method?

2009-06-02 Thread Evgeny Bogdanov
quot;, no luck. Could you please let me know how I can call the action through that route with post method? Thank you in advance, Evgeny = map.with_options(:controller => "assets", :conditions =>{:method => :post}) do |m| m.create_asset

Re: [rspec-users] [rspec] Stubbing partials in view specs

2009-03-19 Thread Evgeny Bogdanov
d scenario template.stub!(:render) #stub render function template.should_receive(:render) #check if render function was called Am I right? Thanks, Evgeny On Mar 18, 11:23 pm, Zach Dennis wrote: > On Wed, Mar 18, 2009 at 6:18 AM, Evgeny Bogdanov > > > > wrote: > > Hello, >

Re: [rspec-users] [rspec] Stubbing partials in view specs

2009-03-18 Thread Evgeny Bogdanov
es === Is it possible to stub the render call with specific partial name? Thank you in advance, Evgeny On Jan 20, 5:35 pm, Bart Zonneveld wrote: > On 20-jan-2009, at 15:29, David Chelimsky wrote: > > > On Tue, Jan 20, 2009 at 7:44 AM, Bart Zonneveld   > > wrote: > >>

[rspec-users] evgeny.zislis has invited you to Spokeo

2009-03-15 Thread evgeny . zislis
Hi rspec-users, evgeny.zis...@gmail.com has invited you to try Spokeo, which finds your friends' updates across the Web. Your friends are already using Spokeo to follow you on Web Results. Try Spokeo today to find what your friends are doing across 30 different social networks! Click http://w

[rspec-users] [cucumber] A Perl 5 mini-cucumber

2009-03-14 Thread Evgeny
Hi All, I wrote a Cucumber version in Perl 5. It's very minimal, but maybe someone will find it interesting. Check it out on http://github.com/kesor/p5-cucumber - evgeny ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforg

[rspec-users] Perl 5 Cucumber

2009-03-14 Thread Evgeny
anyone can help me out with this project (really small for now), then I would really really appreciate it. Enjoy http://github.com/kesor/p5-cucumber It is really minimal for now, so don't expect much. Regards, Evgeny ___ rspec-users mailing list

Re: [rspec-users] [RSpec][RJS] Problem with specing create.rjs in controller_spec

2009-02-27 Thread Evgeny Bogdanov
? response.should have_tag("#add_comment") after "render :template" doesn't work. Thank you in advance and sorry for the long list. Evgeny PS. Are these questions covered in the book: "The RSpec Book: Behaviour Driven Development with RSpec, Cucumber, and Friends&quo

[rspec-users] [RSpec][RJS] Problem with specing create.rjs in controller_spec

2009-02-26 Thread Evgeny Bogdanov
rs a create.rjs template when comment is successfully created in ajax request' FAILED No RJS statement that replaces or inserts HTML content. Thank you! Evgeny =controller def create @comment.save respond_to do |format| format.js end end =create.rjs co

Re: [rspec-users] How to mock an object defined in the before_filter function?

2009-02-26 Thread Evgeny Bogdanov
Thanks a lot Pat for clear and detailed explanations. My initial vision was that I don't change code and do all the manipulations in spec files. Now I understand that it is not really what I should be doing. I should take into account both, and adapt one to another to improve clarity and briefness

Re: [rspec-users] How to mock an object defined in the before_filter function?

2009-02-25 Thread Evgeny Bogdanov
is done with assigns for view specs, so that my spec doesn't depend on it at all. Best, Evgeny PS. Sorry for bother @comment = Space.comment, the test will fail. before_filter :find_comment def find_comment @comment = Comment.find(:first, :conditions => ['id= ?&#

Re: [rspec-users] How to properly mock a complex object "comment.initiator.group.name"?

2009-02-25 Thread Evgeny Bogdanov
Thanks a lot! Got an idea! On Feb 25, 11:35 am, Pat Maddox wrote: > On Wed, Feb 25, 2009 at 2:13 AM, Evgeny Bogdanov > > > > wrote: > > I am wondering what is the best way to mock such expression: > > "comment.initiator.gr

[rspec-users] How to properly mock a complex object "comment.initiator.group.name"?

2009-02-25 Thread Evgeny Bogdanov
I am wondering what is the best way to mock such expression: "comment.initiator.group.name" What I do now is: === comment = mock_model(Comment) initiator = mock_model(User) group = mock_model(Group, :name => "Admin") initiator.stub!(:group).and_return(group) comment.stub!(

Re: [rspec-users] How to mock an object defined in the before_filter function?

2009-02-25 Thread Evgeny Bogdanov
ssigns[:comment] = mock("comment") works only for views? Thank you, Evgeny On Feb 23, 8:32 pm, David Chelimsky wrote: > On Fri, Feb 20, 2009 at 10:17 AM, Evgeny Bogdanov > > wrote: > > Hello, > > > I am trying to implement the following scenario, but I am stuck ...

[rspec-users] How to mock an object defined in the before_filter function?

2009-02-23 Thread Evgeny Bogdanov
the controller and variable @var is defined in another place and controller just uses it. my_var.stub!(:function).and_return(@var) doesn't seem to be working. Is there is something like my_var.stub!(:function).add_variable(@var).and_return(:true) ? Thank you, Evgeny =controller_f