Re: [rspec-users] Help with global before behavior...

2009-05-08 Thread David Chelimsky
On Fri, May 8, 2009 at 1:51 PM, Denis Haskin wrote: > Okay, I guess I can do this with shared examples.  I added to my > spec_helper.rb: > > describe "an admin user is signed in", :shared => true do >  before( :each ) do >   @admin_user = Factory(:admin_user) >   login_as @admin_user >  end > end

Re: [rspec-users] rspec_scaffold and mocha

2009-05-08 Thread Zach Dennis
On Thu, May 7, 2009 at 7:40 AM, jevado wrote: > Hi All, > > I have a question about the rspec_scaffold and if it's compatible with > other mocking frameworks. > I just created a blank application and a scaffold of a very basic > model. The specs run fine untill I choose to use mocha in the > spec_

Re: [rspec-users] [cucumber] how to debug cucumber with netbeans?

2009-05-08 Thread Ben Mabey
Jean-Michel Garnier wrote: 3 months ago, I submitted a patch to cucumber so I could run cucumber from a ruby script and use the debugger in netbeans (https://rspec.lighthouseapp.com/projects/16211/tickets/128-running-feature-from-ruby-script) It worked well at the time but I can't make it work w

Re: [rspec-users] [cucumber] -n command line option looks in every feature file

2009-05-08 Thread Ben Mabey
Mark Wilden wrote: Running 'cucumber -n "asdf" features/challenge.feature' seems to load every feature file from the Rails root on down. In particular, it loads example features in vendor/gems like Ben's email_spec which requires Rails 2.2.2. This makes the command fail for us, since we've fro

Re: [rspec-users] Help with global before behavior...

2009-05-08 Thread Scott Taylor
Denis Haskin wrote: I'm having a devil of a time getting some global before behavior to work the way I think it should. I have a set of controllers that are used only by administrative users, so login is required. To run examples just against the functionality, ideally I'd like to be able to

Re: [rspec-users] top posting and plain text

2009-05-08 Thread Bart Zonneveld
On 7 mei 2009, at 19:12, Kero van Gelder wrote: So let me get this right, you agreed with Aslak that you shouldn't top post. by top posting lol.. Yes. :) Sarcasm somethings doesn't come across well over email I suppose. Not only that, he did it in so it was impossible for me to

Re: [rspec-users] [RSpec] implicit receiver for should problem when helper predicate methods are in use

2009-05-08 Thread Jarmo Pertman
Added patch and specs to https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/816-possibility-to-use-self-as-a-subject-for-explicit-receiver Jarmo ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-u

[rspec-users] [cucumber] -n command line option looks in every feature file

2009-05-08 Thread Mark Wilden
Running 'cucumber -n "asdf" features/challenge.feature' seems to load every feature file from the Rails root on down. In particular, it loads example features in vendor/gems like Ben's email_spec which requires Rails 2.2.2. This makes the command fail for us, since we've frozen 2.3.2. I would imagi

Re: [rspec-users] Help with global before behavior...

2009-05-08 Thread Denis Haskin
Okay, I guess I can do this with shared examples. I added to my spec_helper.rb: describe "an admin user is signed in", :shared => true do before( :each ) do @admin_user = Factory(:admin_user) login_as @admin_user end end and then in each controller that needs that behavior: it_should

[rspec-users] Help with global before behavior...

2009-05-08 Thread Denis Haskin
I'm having a devil of a time getting some global before behavior to work the way I think it should. I have a set of controllers that are used only by administrative users, so login is required. To run examples just against the functionality, ideally I'd like to be able to set up a before() th

Re: [rspec-users] Problem verifying routing error

2009-05-08 Thread Ben Mabey
Randy Harmon wrote: Hi, When upgrading to rspec/rspec-rails 1.2.6 gem (from 1.1.12), I'm having a new problem verifying routes that should not exist. This is to support something like this in routes.rb: map.resources :orders do |orders| orders.resources :items, :except => [:index,:show] en

Re: [rspec-users] Error in executing controller spec

2009-05-08 Thread David Chelimsky
On Fri, May 8, 2009 at 4:03 AM, Amit Kulkarni wrote: > Hello, > >     I am trying to execute controller spec but it gives me error which > says > >     @controller is nil: make sure you set it in your test's setup > method. > > I tried to search for the solution but till now no success :( > > Foll

Re: [rspec-users] Add comments to cucumber text features?

2009-05-08 Thread aslak hellesoy
On Fri, May 8, 2009 at 4:30 PM, Ingo Weiss wrote: > Hi all, > > Often I find myself wishing there was a way to add comments to cucumber > text features that are ignored by the parser. Is this possible somehow? > # Yes # it is possible # anywhere Aslak > Thanks! > Ingo > >

[rspec-users] Add comments to cucumber text features?

2009-05-08 Thread Ingo Weiss
Hi all, Often I find myself wishing there was a way to add comments to cucumber text features that are ignored by the parser. Is this possible somehow? Thanks! Ingo ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/list

Re: [rspec-users] Sharing common Cuke steps

2009-05-08 Thread aslak hellesoy
> > On 8 May 2009, at 09:12, aslak hellesoy wrote: > > >> >> On 8 May 2009, at 05:55, Mike Doel wrote: >> >> Cucumber is awesome and destined to rule the world. As that starts to >> happen, has there been any thought of a mechanism for the community to build >> a library of common, generally usefu

[rspec-users] [cucumber] how to debug cucumber with netbeans?

2009-05-08 Thread Jean-Michel Garnier
3 months ago, I submitted a patch to cucumber so I could run cucumber from a ruby script and use the debugger in netbeans (https://rspec.lighthouseapp.com/projects/16211/tickets/128-running-feature-from-ruby-script) It worked well at the time but I can't make it work with cucumber 0.3.2. Here is

Re: [rspec-users] Where to spec authentication and roles-based permissions?

2009-05-08 Thread Zach Dennis
On Fri, May 8, 2009 at 5:33 AM, doug livesey wrote: > Hi -- I'm writing an app that both requires authentication via a logon, and > also has roles-based permissions (using acl_system2), and was wondering > where to verify that both are happening. > I've started out putting them in a special cucumb

Re: [rspec-users] Where to spec authentication and roles-based permissions?

2009-05-08 Thread Matt Wynne
On 8 May 2009, at 10:33, doug livesey wrote: Hi -- I'm writing an app that both requires authentication via a logon, and also has roles-based permissions (using acl_system2), and was wondering where to verify that both are happening. I've started out putting them in a special cucumber featur

Re: [rspec-users] Sharing common Cuke steps

2009-05-08 Thread Matt Wynne
On 8 May 2009, at 09:12, aslak hellesoy wrote: On 8 May 2009, at 05:55, Mike Doel wrote: Cucumber is awesome and destined to rule the world. As that starts to happen, has there been any thought of a mechanism for the community to build a library of common, generally useful steps that

Re: [rspec-users] Sharing common Cuke steps

2009-05-08 Thread Mike Doel
Ok. That sounds like a good plan. I'll update it to a gem and submit the wiki change when I get home from vegas. Mike Doel m...@mikedoel.com On May 8, 2009, at 1:12 AM, aslak hellesoy wrote: On 8 May 2009, at 05:55, Mike Doel wrote: Cucumber is awesome and destined to rule the world.

[rspec-users] RCov and Ruby 1.9.1

2009-05-08 Thread Rainer Kuhn
Has anyone got RCov working with Ruby 1.9.1? The rcov gem won't even install, and the spicycode-rcov gem crashes. It would be nice to still benefit from rcovs features. Tick -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-us

[rspec-users] Error in executing controller spec

2009-05-08 Thread Amit Kulkarni
Hello, I am trying to execute controller spec but it gives me error which says @controller is nil: make sure you set it in your test's setup method. I tried to search for the solution but till now no success :( Following is the description of the controller spec. describe ChannelCate

[rspec-users] Where to spec authentication and roles-based permissions?

2009-05-08 Thread doug livesey
Hi -- I'm writing an app that both requires authentication via a logon, and also has roles-based permissions (using acl_system2), and was wondering where to verify that both are happening. I've started out putting them in a special cucumber feature for authentication & permissions, but this is beco

Re: [rspec-users] [RSpec] implicit receiver for should problem when helper predicate methods are in use

2009-05-08 Thread Jarmo Pertman
On May 8, 10:50 am, David Chelimsky wrote: > This is pretty helpful, thanks for a more thorough explanation. I did > add your patch locally, however, and it doesn't seem to solve the > problem (I still get undefined method `ok?' when I run the example in > your 2nd post). Sorry. It didn't work b

Re: [rspec-users] Taza with Flex

2009-05-08 Thread aslak hellesoy
> Hello, > > Can somebody help me out in how to use Taza framework with Flex > applications? Following is the script to perform operations on Flex > application, please let me know how to do the same with Taza frame work: > You have come to the wrong place - you're not even using RSpec. Try the fu

Re: [rspec-users] Sharing common Cuke steps

2009-05-08 Thread aslak hellesoy
> > On 8 May 2009, at 05:55, Mike Doel wrote: > > Cucumber is awesome and destined to rule the world. As that starts to >> happen, has there been any thought of a mechanism for the community to build >> a library of common, generally useful steps that can be used across >> projects? I've got stu

Re: [rspec-users] [RSpec] implicit receiver for should problem when helper predicate methods are in use

2009-05-08 Thread David Chelimsky
On Thu, May 7, 2009 at 11:06 PM, Jarmo Pertman wrote: > I think that I don't understand what you mean by that exactly. I mean, > I patched the should and should_not methods in moule > Subject::ExampleMethods themselves, which means that this changes only > behaviour of subject itself e.g. it is al

[rspec-users] Taza with Flex

2009-05-08 Thread shaik shaik
Hello, Can somebody help me out in how to use Taza framework with Flex applications? Following is the script to perform operations on Flex application, please let me know how to do the same with Taza frame work: require 'test/unit' require 'funfx' class AlertControlTest < Test::Unit::TestCase

Re: [rspec-users] Sharing common Cuke steps

2009-05-08 Thread Matt Wynne
On 8 May 2009, at 05:55, Mike Doel wrote: Cucumber is awesome and destined to rule the world. As that starts to happen, has there been any thought of a mechanism for the community to build a library of common, generally useful steps that can be used across projects? I've got stuff that I