Re: [rspec-users] undefined local variable or method `params' for #

2009-06-07 Thread Salil Gaikwad
Hi All, Any Update on this topic. I still not found any solution for a following method. it "should be active if controller is same" do tab_class('tab').should include('active') end Regards, Salil -- Posted via http://www.ruby-forum.com/. __

Re: [rspec-users] before(:all)

2009-06-07 Thread lawrence.pit
Hi, I took a stab at this and created what I call Machinery. So far it works great for me. For those that are looking for a way to create objects in the database in a before(:all) instead of a before(:each) to speed up tests, have a look at: http://github.com/lawrencepit/machinery Cheers, Lawr

Re: [rspec-users] Missing template in helper specs with a render

2009-06-07 Thread Charlie Bowman
Sent from my iPhone On Jun 7, 2009, at 8:54 AM, Rick DeNatale wrote: On Sun, Jun 7, 2009 at 4:24 AM, Charlie Bowman> wrote: On Jun 6, 2009, at 10:02 PM, Zach Dennis wrote: For example, if I need to display a piece of information for an admin, but not a normal user then I have no pr

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-07 Thread Wolfram Arnold
Yi Wen wrote: > I do this: > > Fixtures.reset_cache > fixtures_folder = File.join(RAILS_ROOT, 'test', 'fixtures') > fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| > File.basename(f, '.yml') } > fixture_class_names = {} # or whatever needed > Fixtures.create_fixtures(fixtures_folder,

Re: [rspec-users] Missing template in helper specs with a render

2009-06-07 Thread Rick DeNatale
On Sun, Jun 7, 2009 at 4:24 AM, Charlie Bowman wrote: > On Jun 6, 2009, at 10:02 PM, Zach Dennis wrote: >> For example, if I need to display a piece of information for an admin, >> but not a normal user then I have no problem doing the "if >> current_user.admin?" check in a view: >> >>  <% if cur

Re: [rspec-users] Missing template in helper specs with a render

2009-06-07 Thread Charlie Bowman
Sent from my iPhone On Jun 6, 2009, at 10:02 PM, Zach Dennis wrote: On Sat, Jun 6, 2009 at 6:34 PM, Charlie Bowman> wrote: I consider an if statement in the view layer a bug. Perhaps we can consider it a possible code smell? It's not really a bug unless it's producing incorrect or unexpect