[Rails] Re: Cucumber test question
On Tuesday, 11 February 2014 21:43:40 UTC+1, Vell wrote: Hello all, I am trying to understand when I try to run a test in cucumber what I am missing that it is failing. I am using FactoryGirl to create my records and using cucumber to test my logic however I know that I am doing something wrong in my testing I just can't seem to figure out what. Here is what I have: Feature: Feature: All features related to staff info Scenario: notification for empty shirt size Given there is at least 1 staff info record When the shirt size field is empty And the shirt size check is run Then the system should send an email notification Steps: Given(/^there is at least (\d+) staff info record$/) do |arg1| assert_difference('StaffInfo.count', 1) do @staff_info = FactoryGirl.create :staff_info end end When(/^the shirt size field is empty$/) do assert @staff_info.update_attribute(:shirt_size, nil) end When(/^the shirt size check is run$/) do StaffInfo.check_empty_shirt_fields end Then(/^the system should send an email notification$/) do pending # express the regexp above with the code you wish you had end Model: class StaffInfo ActiveRecord::Base belongs_to :person scope :empty_shirt_fields, - { where('shirt_size in (?)', [nil, '']) } def self.check_empty_shirt_fields staff_with_missing_shirt_sizes = StaffInfo.empty_shirt_fields debugger send_empty_shirt_size_notification staff_with_missing_shirt_sizes if staff_with_missing_shirt_sizes.size 0 end def send_empty_shirt_size_notification(staff_records) Mailer.missing_shirt_size(staff_records).deliver end end What is happening is, when I hit the 3rd test I did a check to see if the record was present (StaffInfo.count) and it was. But after running StaffInfo.check_empty_shirt_fields, I did a check for the record and it was gone. I am not understanding how my record could have disappeared when I all my method was doing was checking for any records with a missing field. Anyone have any ideas? Vell, One way to be able to find out what is happening is: a) tag your scenario with @pause, that will pause after each step. b) Open a terminal and have a look at the test log file: tail -f log/test.log That way you can see what is happening in the test database at each step, and when records are created, and/or the database is cleared. P.S. It would also be a better idea to post your question in the cucumber email list if you still have problems https://groups.google.com/forum/#!forum/cukes -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c52be53c-b79a-4309-a3ec-0b8337f6fcfe%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Web App looking for a new business model
On Friday, 7 February 2014 12:30:06 UTC+1, Ruby-Forum.com User wrote: @Kosmas, Thanks again for the Slicing Pie book, I bought it last night and read it in one sitting. Very interesting and it gave me a solid ground for what I was already thinking. No problem Yves, Glad you found it interesting and helpful. I thought the same way when I was told about it. I think it makes sense, and it sounds fair. Now, I need to validate what type of pie and Grunt Fund can work out. If someone would be offering a pie that looks like this: 50% of profit for the next 2 years with a possibility of converting some of this profit into a 25% equity after the 2 years. This applies of course to all the Grunts working on the project and I am looking at 2 or 3 grunts max. Would that be enticing enough? I think that depends on the Grunts :-) , and their situation at the time you decide how you want to go about it. To me it sounds fair. There is also a spreadsheet that may help you make your calculations. Have you seen it? http://www.slicingpie.com/the-grunt-fund-calculator/ Yves -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/95aa0362-84e3-4c06-b717-f64bcea59e45%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: Web App looking for a new business model
On Thursday, 6 February 2014 04:32:12 UTC+1, Ruby-Forum.com User wrote: Hi RoR developers I am interested in hearing your thoughts on this. I will very shortly develop a web application for the eLearning industry in a SaaS model. I have a good idea and some very good contacts in the industry. I am more of a .NET person but decided to make it in Ruby in order to have the capability to adapt the product more rapidly and let’s face it, the starting cost with the technology are much more attractive. Now, I could do it on my own over time but I would like to have 2 or 3 experienced RoR devs with me in this endeavor. Their expertise would speed up the development, complement my own skills in product and software development and make it much more fun and interesting. The issue I am facing right now is that at this point, I don’t want to give away any equity in the project and I am not a startup with a cashflow where I can pay developers an hourly rate. What I am, is a father of two with a day job and an entrepreneurial spirit whose take on software development and life is very similar to the folks at 37Signals (now Basecamp). What I want is to have an amazing life-work balance and work on something I love. I am committed to build a great team of dedicated individuals who will also have an amazing life-work balance, where every member will have a say in the direction of the product and where money will not be a preoccupation (meaning that they will earn much more than any other place for the same type of job). I will always remain private and never seek public or VC funds so don’t expect a Cinderella story. I have been exposed too much to a public company modus operandi to know that I don’t want this model. Now, my question to you is what business model would make it interesting for experienced devs to share the risks? Beside eventually be part of a company with the aforementioned description, what would you consider an interesting proposition to develop the product on your spare time (a few hours per week) until it takes off? Although I am not opened to give away equity (for the moment at least), I am more than willing to share the profits for a certain amount of time or up to a specific amount. What would make it interesting to take on the risks? What would you consider a win-win business model? Looking forward to hearing your thoughts on this Yves -- Posted via http://www.ruby-forum.com/. Hi Yves, Do you know about this one? http://www.slicingpie.com/ -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/20e0b93a-98b9-41a4-b1d2-11df4cb98741%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[Rails] Re: rails and Asterisk
On Monday, 3 February 2014 13:16:29 UTC+1, Soufiane EL HAMCHI wrote: hi everybody :-) do you have any idea in how we can use Asterisk with ruby / RoR ? for example : if i want to make a call .. How can i exploit the methode that make this call or send a message ? Hi, Do you know about this one? http://adhearsion.com/ -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4beae250-c10d-46af-bbe2-34db6a67c8e1%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.