Re: [rspec-users] spec'ing theme views

2009-04-06 Thread David Chelimsky
On Mon, Apr 6, 2009 at 11:59 PM, Phlip wrote: > David Chelimsky wrote: > >> Try this: >> >> describe "/default/index.html.erb", :type => :view do >>  include DefaultHelper >> >>  it "should render" do >>   template.view_paths=(File.join(File.dirname(__FILE__), >> "/../../../themes/my_theme/")) >>

Re: [rspec-users] spec'ing theme views

2009-04-06 Thread Phlip
David Chelimsky wrote: Try this: describe "/default/index.html.erb", :type => :view do include DefaultHelper it "should render" do template.view_paths=(File.join(File.dirname(__FILE__), "/../../../themes/my_theme/")) render end And why isn't that DRY with the matching /../../../them

Re: [rspec-users] spec'ing theme views

2009-04-06 Thread Zach Dennis
On Mon, Apr 6, 2009 at 8:06 PM, jared wrote: > I'm using the theme support plugin on one of my apps, and I would like > to spec the views for each of my themes, but having a little trouble > and hoping someone can point me in the right direction. > > Themed views are located at /themes/my_theme/vi

Re: [rspec-users] spec'ing theme views

2009-04-06 Thread David Chelimsky
On Mon, Apr 6, 2009 at 7:06 PM, jared wrote: > I'm using the theme support plugin on one of my apps, and I would like > to spec the views for each of my themes, but having a little trouble > and hoping someone can point me in the right direction. > > Themed views are located at /themes/my_theme/vi

[rspec-users] spec'ing theme views

2009-04-06 Thread jared
I'm using the theme support plugin on one of my apps, and I would like to spec the views for each of my themes, but having a little trouble and hoping someone can point me in the right direction. Themed views are located at /themes/my_theme/views that override the views in app/views when that them

Re: [rspec-users] JSON matcher

2009-04-06 Thread Phlip
Michael Schuerig wrote: def failure_message "expected\...@raw_target}\n" + "to be JSON code equivalent to\...@raw_expected}\n" + "Difference:\...@expected.diff(@target).inspect}" end Nice - this fixes the common problem with assertions on large bulky variabl

Re: [rspec-users] a wiki to host Cuke & webrat?

2009-04-06 Thread Phlip
John Goodsen wrote: I never said it was done - you are supposed to help out Phlip! Verbiage issue - sorry! I didn't see a "plugin" here. I didn't "envision a plugin in this problem space". I didn't mean I didn't physically see one in your site... > Just a lite wiki, without even

[rspec-users] JSON matcher

2009-04-06 Thread Michael Schuerig
Curiously, there doesn't seem to be a matcher around that matches a JSON string against an expected ruby object. Below is what I've come up with, including some Rails idiosyncrasies. Any suggestions for improvements? Michael module Spec module JSONMatchers class BeJsonEql def init

Re: [rspec-users] Best practices: How small to make > > examples?

2009-04-06 Thread James B. Byrne
On: Mon, 6 Apr 2009 09:36:50 -0700, Mark Wilden wrote: > On Mon, Apr 6, 2009 at 8:02 AM, James B. Byrne > wrote: >> >> ?Given user "myuser" is authenticated >> ?When they visit the registration page >> ? And they provide all required registration data >> ? And they choose "register" >> ?Then they

[rspec-users] [rspec] Deprecate --dry-run

2009-04-06 Thread David Chelimsky
Hey all, Anybody use the --dry-run command line option? I'm planning to deprecate it if nobody has a compelling reason to keep it. Please post your comments in the ticket: https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/781-deprecate-dry-run Thanks, David

Re: [rspec-users] debuggin cucmber script in ruby

2009-04-06 Thread Zach Dennis
On Mon, Apr 6, 2009 at 12:21 PM, Ben Mabey wrote: > Anil Gollaa wrote: >> >> hi, >> Thanks for the information, >> When i run cucumber testfile.feature, I was able to halt execution at >> breakpoint, but when i type 'n'. it is getting in to >> /lib/cucumber/ast/step_invocation.rb:33 and some other

Re: [rspec-users] Best practices: How small to make > examples?

2009-04-06 Thread Mark Wilden
On Mon, Apr 6, 2009 at 3:59 PM, Zach Dennis wrote: > On Mon, Apr 6, 2009 at 12:36 PM, Mark Wilden wrote: >> On Mon, Apr 6, 2009 at 8:02 AM, James B. Byrne wrote: >>> >>>  Given user "myuser" is authenticated >>>  When they visit the registration page >>>   And they provide all required registrat

Re: [rspec-users] Autospec Infinite Loop ??

2009-04-06 Thread David Chelimsky
On Mon, Apr 6, 2009 at 4:50 PM, Arco wrote: > When I run autospec and I have a red example, autospec goes into an > infinite loop and runs over and over until I get rid of the red. > > I hate this.  I want my tests to just run once when my ruby file is > saved - even if I have red examples. > > Th

[rspec-users] Autospec Infinite Loop ??

2009-04-06 Thread Arco
When I run autospec and I have a red example, autospec goes into an infinite loop and runs over and over until I get rid of the red. I hate this. I want my tests to just run once when my ruby file is saved - even if I have red examples. The infinite loop does not happen if my examples are all gr

[rspec-users] [cucumber] more than one keyword translation

2009-04-06 Thread Oliver Barnes
Hello, I'm trying to get Given in Portuguese to have two translations, "Dado" and "Dada" (variations on gender), so that the features are more readable. so I have this in my languages.yml: given: Dado|Dada (found this syntax in a comment within the cucumber codebase) but when I run cucumber -l

Re: [rspec-users] Best practices: How small to make > examples?

2009-04-06 Thread Zach Dennis
On Mon, Apr 6, 2009 at 12:36 PM, Mark Wilden wrote: > On Mon, Apr 6, 2009 at 8:02 AM, James B. Byrne wrote: >> >>  Given user "myuser" is authenticated >>  When they visit the registration page >>   And they provide all required registration data >>   And they choose "register" >>  Then they shou

Re: [rspec-users] a wiki to host Cuke & webrat?

2009-04-06 Thread John Goodsen
I never said it was done - you are supposed to help out Phlip! On Fri, Apr 3, 2009 at 6:52 PM, Phlip wrote: > John Goodsen wrote: > >> this was my vision with rcumber - I haven't worked on it for a few months, >> but it's basically a rails plugin that provides a web interface to edit and >> run

Re: [rspec-users] Best practices: How small to make > examples?

2009-04-06 Thread Mark Wilden
On Mon, Apr 6, 2009 at 8:02 AM, James B. Byrne wrote: > >  Given user "myuser" is authenticated >  When they visit the registration page >   And they provide all required registration data >   And they choose "register" >  Then they should see a registration success message I have two issues with

Re: [rspec-users] debuggin cucmber script in ruby

2009-04-06 Thread Ben Mabey
Anil Gollaa wrote: hi, Thanks for the information, When i run cucumber testfile.feature, I was able to halt execution at breakpoint, but when i type 'n'. it is getting in to /lib/cucumber/ast/step_invocation.rb:33 and some other lib files of cucumber. I just want to debug line by line of the

Re: [rspec-users] debuggin cucmber script in ruby

2009-04-06 Thread Anil Gollaa
hi, Thanks for the information, When i run cucumber testfile.feature, I was able to halt execution at breakpoint, but when i type 'n'. it is getting in to /lib/cucumber/ast/step_invocation.rb:33 and some other lib files of cucumber. I just want to debug line by line of the script, instead of ge

Re: [rspec-users] Best practices: How small to make > examples?

2009-04-06 Thread James B. Byrne
On: Sun, 5 Apr 2009 10:03:40 -0700, Mark Wilden wrote: > > On Sun, Apr 5, 2009 at 5:20 AM, David Chelimsky > wrote: > >> Given I register for a conference >> Then my name should be on the list of conference attendees >> And the conference should be my list of conferences > > If I were describing

Re: [rspec-users] debuggin cucmber script in ruby

2009-04-06 Thread Ben Mabey
Anil Gollaa wrote: basically to debug a ruby script we use: ruby -rspecs -rdebug file.rb which would debug ruby script line by line. Is there any such debuging feauture in cucumber. I just require 'ruby-debug' and set a debugger statement where I want to stop it. When you run cucumber it wi

[rspec-users] debuggin cucmber script in ruby

2009-04-06 Thread Anil Gollaa
basically to debug a ruby script we use: ruby -rspecs -rdebug file.rb which would debug ruby script line by line. Is there any such debuging feauture in cucumber. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyfor

Re: [rspec-users] [cucumber] Nested resource in paths.rb

2009-04-06 Thread aslak hellesoy
On Sun, Apr 5, 2009 at 10:40 PM, GMin, Morten K. Holst wrote: > Hello Rspec Users, > I was wondering how you specify a nested resource in cucumber. So for > example: > > Given I have a blogpost titled Question For Nice Rspec Users > When I am on the list of comments for Question For Nice Rspec Use