On 26 Oct 2009, at 07:10, abhisheksreepal wrote:

Thanks.

There were a few other things odd about your code though. You don't need to use global variables ($), and you're including thinks into the global namespace object. RSpec is heavily block-oriented, and it makes life a lot easier if you understand what it's doing with them. For example, you can do this:

  Spec::Runner.configure do |config|
    config.include(MyModule)
  end

If you're coming to Ruby from another language, it would probably pay off quickly to study blocks and modules in more detail. It'll save a lot of pain later on.

Ashley

--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/







_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to