search for: evangelis

Displaying 20 results from an estimated 23 matches for "evangelis".

Did you mean: vangelis
2005 Mar 15
2
Asterisk Queue strange behaviour
Hi. I have a problem which I assume would be easy to fix, but I can't find anything about it... I wish to have people dialing my phone, and if it is busy, they are put into a queue. And then I am dialed back when the previous call is finished, and connected to the waiting caller. Easy enough? ----------exten exten => 6,1,Background(salesq-intro); exten => 6,2,Queue(salesq|tT|||300);
2007 Sep 03
6
blog post on story runner
Here''s an excellent blog post on Story Runner, which will be part of the next release and is undergoing active development in trunk: http://evang.eli.st/blog/2007/9/1/user-stories-with-rspec-s-story-runner
2007 Jan 19
3
Something cool I learned about rspec today
I found an awesome feature today. When you''re setting expectations, you can actually pattern match the parameters to methods. Here''s my discussion and example: http://evang.eli.st/blog/2007/1/19/parameter-matching-in-rspec Pat
2007 Apr 04
2
[PLUGIN] ArPaginator - Allows you to easily paginate over any existing AR queries.
The built-in Rails pagination is fairly limited...you pass in the model name, and optionally some conditions, and it generates a paginated query for you. This gets to be very bad if you''ve got any custom queries. class Company < ActiveRecord::Base def complete_videos Video.find :all, :conditions => "company_id=#{id} AND status=''complete''", :order
2007 Sep 20
10
Getting Started with Story Runner
I haven''t found any How To''s to use story runner and I''m not sure how to get started. Should I be looking for resources on how to use rbehave? How do I generate my first Story? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070920/07a80bc7/attachment.html
2007 Mar 13
1
Opening the singleton class of mocked objects
I wrote a plugin [1] a while ago that lets me do validations on a single AR instance. Instead of defining validations in an AR class, I can define them on a AR instance''s singleton class: class << @video validates_presence_of :title end One of my specs mocks Video.find, and the above code is run on the mock object. When I run the spec, I get the expected undefined method
2007 Jan 20
0
[PLUGIN] instance_validations
Get info at http://evang.eli.st/blog/2007/1/20/instance-validations-plugin (until I set up an open svn repository). Download link is at the bottom of that page InstanceValidations =================== ActiveRecord lets you define validations at the class level. This plugin lets you define validations for ActiveRecord instances. Take the following ActiveRecord class: class Chicken <
2008 Mar 03
2
Testing Plugins + Lib Code
Hi, I''m quite new to Rspec and I''m embarking on a new project. One thing I''m really not sure about is how to test plugins and code in your ''lib/'' folder. Where would these specs actually live in the dir structure? Should you test plugins by creating specs within the plugin''s dir? Or by adding a spec to the main ''/specs''
2007 Apr 04
1
[PLUGIN] count_from_query - easily convert finder queries into count queries
count_from_query gives you the ability to generate a COUNT query from a standard Rails find. For example, if you have the query User.find :all it would be trivial to get a count: User.count however, if you have a more specific finder method, such as class Company < ActiveRecord::Base def complete_videos Video.find :all, :conditions => "company_id=#{id} AND
2008 Jan 21
3
Story runner "macros"
I''ve gotten quite a bit out of Pat Maddox''s screencast http://evang.eli.st/blog/2007/10/8/story-runner-top-to-bottom-screencast One thing I''m not sure of is the feature where he writes things like: When "I POST to", "/articles", :post => {:title => "Title", :body => "Body") do | path, params| post_via_redirect
2008 Jun 10
1
Refactoring''s code needs refactoring''s specs?
Hi guys, I have one question: When refactoring the working code I need or should refactoring the specs too? My old code is: http://pastie.org/private/gpskgtavm4yzutanq1ro3w My new refactored code: http://pastie.org/private/2emgi1hr5iga3m9jib4q and the specs that are still passing without refactoring: http://pastie.org/private/qn3uaoin0k2n8vjsusssg Regards. -- "Most of you are
2007 Sep 15
3
How to write a plugin that uses rspec internally?
My team is working on a plugin and we want to use RSpec internally for the plugin''s tests. (a) What are some different ways to go about this? Should we rely on the RSpec gem? Should we expect that the "host" Rails application has installed the RSpec plugins? Are there other options? (b) Which approach from (a) would you recommend? (c) Would you recommend any particular
2007 Apr 04
0
rspec_plugin generator
I''ve created a couple plugins lately, and have been using RSpec instead of Test::Unit for them, so I wrote up this little generator. Also does some isolated database testing if you want as an added bonus. Basic info: Rails gives us a generator to create plugins with ./script/generate plugin. It creates all the stub files, including some tests for you. What if you want to use RSpec
2007 Jan 09
0
#6928 Get a new oracle connection on every request
I think this would be good to look at for 1.2 What is happening is that under oracle in development mode you get a new connection on every request, without old connections being closed/disconnected. So in my shop after about 200 requests I am blocking all new connections for anything using this oracle instance. Not a great selling point for my efforts to evangalize rails to my fellow devs using
2007 Feb 21
1
Rendering all the elements when calling Array#to_xml
When I call to_xml on an array, I want it to get the XML for all the elements in it. I''ve defined to_xml in my class. >> r.to_xml => "<video><id>1</id><views>2</views></video>" >> a = [r] => [#<StatisticsReport:0x3259f38 @video_id=1, @views=2>] >> a.to_xml => "<?xml version=\"1.0\"
2007 May 24
9
Mocking, changing method interfaces and integration tests
Suppose we have a method ''foo'' which internally uses another method ''bar''. Being good BDDers we mock out the ''bar'' method. After all, we only want to spec the ''foo'' method - actually running the ''bar'' method means slower, less maintainable and brittler specs. That''s why we <3 mocking,
2007 Sep 29
4
How to write the very first example?
Many posts on this list are about using RSpec with Rails and that''s the way I''m also using RSpec all the time. Unfortunately there isn''t that much info about using RSpec for standalone Ruby projects. I must admit I''m really having a hard time writing the very first example(s) for a fresh standalone Ruby project. I haven''t really got a clue where to
2007 Sep 12
12
Philosophical questions
Disclaimer: The following are observations by a relatively new user (couple of weeks) of RSpec and not intended as RSpec trollbait. Also, forgive me if similar topics have been discussed elsewhere on the mailing list. I at least did the due diligence of a quick search. That said... I''ve been positively thrilled with RSpec for use outside of Rails. It has been in my attempts
2008 Mar 10
10
tutes on testing controllers
hello spec''ers, i''m in the hunt for guides on testing controllers with rspec, would you guys recommend any? thanks Oliver -- Oliver Azevedo Barnes oli.azevedo.barnes at gmail.com +55 11 9768 0193 http://www.linkedin.com/in/oliverbarnes http://workingwithrails.com/person/4704-oliver-barnes
2006 May 05
31
The perfect development environment?
I am trying to create the perfect development environment for rails and i dont know exactly which way to go. Do i create a windows environment or a *nix environment. If i go *nix, what distro is best suited for rails. I would be using mysql, so that would come in to play. If i go *nix, i would use apache. Any ideas for the right environment would be greatly appreciated. I guess the major choice is