Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-03 Thread David Chelimsky
On Aug 2, 2010, at 7:52 AM, David Chelimsky wrote: On Aug 1, 2010, at 10:08 PM, Myron Marston wrote: OK, I tried to implement #module_exec on ruby 1.8.6, and here's what I came up with: http://github.com/myronmarston/rspec-core/commit/364f20ebd5b7d9612227cb6e86a6e8c8c2e9931e It works

[rspec-users] [RSpec] Testing a helper with or without model layer?

2010-08-03 Thread Bruno Cardoso
Hi guys, I wanted to get a more experienced opinion about a test I had to do. I posted the code at pastie with comments for best visual readability: http://pastie.org/private/qvvrxubslvia2nv6l3km4q Any feedback is appreciated Thanks -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-03 Thread David Chelimsky
On Aug 3, 2010, at 6:43 AM, Ashley Moran wrote: On Aug 03, 2010, at 12:22 pm, David Chelimsky wrote: My inclination is to get this feature out with explicit non-support for 1.8.6, and then add support for 1.8.6 if we can get this to work. Working on that now - should be pushing some

Re: [rspec-users] [RSpec] Testing a helper with or without model layer?

2010-08-03 Thread David Chelimsky
On Aug 3, 2010, at 6:34 AM, Bruno Cardoso wrote: Hi guys, I wanted to get a more experienced opinion about a test I had to do. I posted the code at pastie with comments for best visual readability: http://pastie.org/private/qvvrxubslvia2nv6l3km4q Even though the code is in a helper, it

Re: [rspec-users] [RSpec] Testing a helper with or without model layer?

2010-08-03 Thread Bruno Cardoso
Hi David Even though the code is in a helper, it depends heavily on the model. This exhibits a code smell called Feature Envy, in which one object (the helper) does some computation but another object (the CfgInterface model) has all the data. Based on that, one might argue this method

[rspec-users] RSpec 2 add-on for testing and specifying generators - initial release

2010-08-03 Thread Kristian Mandrup
http://github.com/kristianmandrup/rspec_for_generators When creating Rails generators I noticed that the only option I could find for testing was to use a special Rails TestCase class created specifically for use with Test Unit. So I thought I could wrap it to be used with RSpec 2 instead. I now

Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-03 Thread Ashley Moran
On 3 Aug 2010, at 12:50 PM, David Chelimsky wrote: Pushed: http://github.com/rspec/rspec-core/commit/84303616be1ac2f8126675488947b47f6945cebe http://github.com/rspec/rspec-core/commit/3cea7b8bea51766d632e20bcc9ef15c64b719ea1 Awesomeness! Please do let me know if this works with what

Re: [rspec-users] Evaluating shared example customisation block before shared block

2010-08-03 Thread David Chelimsky
On Aug 3, 2010, at 4:35 PM, Ashley Moran wrote: On 3 Aug 2010, at 12:50 PM, David Chelimsky wrote: Pushed: http://github.com/rspec/rspec-core/commit/84303616be1ac2f8126675488947b47f6945cebe http://github.com/rspec/rspec-core/commit/3cea7b8bea51766d632e20bcc9ef15c64b719ea1

Re: [rspec-users] [RSpec] Testing a helper with or without model layer?

2010-08-03 Thread David Chelimsky
On Aug 3, 2010, at 9:23 AM, Bruno Cardoso wrote: Hi David Even though the code is in a helper, it depends heavily on the model. This exhibits a code smell called Feature Envy, in which one object (the helper) does some computation but another object (the CfgInterface model) has all the

Re: [rspec-users] RSpec 2 add-on for testing and specifying generators - initial release

2010-08-03 Thread David Chelimsky
On Aug 3, 2010, at 3:06 PM, Kristian Mandrup wrote: http://github.com/kristianmandrup/rspec_for_generators When creating Rails generators I noticed that the only option I could find for testing was to use a special Rails TestCase class created specifically for use with Test Unit. So I