We @ Wroc_❤.rb and we ❤ Vention Dention
We’re proud to announce wroc_love.rb 2012. The very first of such conferences in a beautiful city of Wrocław. What is this conference about?
A fresh Ruby conference organized by thriving local Ruby community. We’re keen on experimenting, value original ideas and diversity of opinions – as long as they’re backed with valid arguments.
You can meet : Georg, Bumi, Mike, Ralph, myself and our friend Nick.
We’re giving a talk
What is our talk about? About.. “Pit .. Brad Pit..Pit’s..ahhr! Just get out of the trap!!!” In our talk we will share some of the most interesting, absurd, or funny moments and insights we have experienced in past couple of years. As developers and business founders, we present the best of our own mistakes and show you how we got out of the pits we fell into. Believe us, we’ve been there as well and, hopefully, attending our talk will help you not make our mistakes. ;) It will be a serious fun! The talk will cover both technical and other subjects. Each mistake will get a 2-3 min coverage. Read more about us and our talk at the conference page and on their blog.
We love punk rock
Did you know we have our own band? No? Ok… now you know it! We’re proud to indroduce you to…
Vention Dention
Oh yeah. Vention Dention is on tour again… and we’re with them all the time. So the next gig’s are:
- wroc_love.rb, 10.-11. March 2012, Wrocław, Instytut Informatyki, Uniwersytet Wrocławski
- Nodecamp.eu (Details coming soon)
We’re planing some more gigs with them and everything will be announced on their homepage, on Railslove’s Vention Dention Homepage and via Twitter (@ventiondention). So stay tuned!
For now, just for you… Vention Dention:
See you @ wroc_love.rb!
No magic behind it but everytime worth to remember
Rspec Refactoring and Shared Example Groups
Today we had lightning talks about specs refactoring. Jan showed us some tricks based on his experiences from our latest open source project: railsrunners.org (Github):
Some simple spec principles
- Use clear descriptions for your specs in combination of using “describe”-, “context”-blocks
- Use contexts and descriptions properly, e.g.:
describe "#edit"; context "with valid params"; etc. - Use the –format documentation parameter to check your descriptions for specs, describes, and contexts. E.g.:
rspec spec/controllers/participants_controller_spec.rb --format documentation - Instead of manually creating associated models in your tests just to pass validations, FactoryGirl can automatically create them for you, e.g.:
- Then instead of:
- You’d simply have:
- Write one assertion per test.
- Stub requests using FakeWeb (Update: or WebMock or any other Request-Mocking-Helper), e.g.: FakeWeb.register_uri(:get, “http://static-maps-generator.appspot.com/url?msid=#{@future_run.msid}&size=950×300″, :body => response)
- Controller specs should only test the behaviour of your controller. Model specs test the behaviour of your model. Don’t mix the two! E.g.: do not test after_ or before_ save callbacks in your controller tests.
Take a look at the railsrunners Github repository: Github
Shared example groups
Sometimes you want to test the same behaviour in various specs or contexts. To keep your code DRY, you can use RSpec’s shared example groups:
If needed, you can move the shared example group to a spec helper and require that wherever you need to test for ‘successful responses’.
Further reading:
https://www.relishapp.com/rspec/rspec-core/v/2-0/docs/example-groups/shared-example-group
http://rspec.info/documentation/
http://blog.davidchelimsky.net/2010/11/07/specifying-mixins-with-shared-example-groups-in-rspec-2/
Global Day of Coderetreat Cologne / Bonn
Corey Haines is organizing a Global Day of Coderetreat for the 3rd of December. Many cities world-wide will collaborate and hold local code retreat events. Cologne, especially the Coworkingspace Gasmotorenfabrik is one of the hosts. For future details and registration check out:
Backlash @ Robot Unicorn Invasion Party 2011
Help You need somebody; Help not just anybody!
Here at Railslove, we love building web applications. But aside from our core business, we also help other startups understand how the web works and what it means to run a web business — in Hamburg, Berlin, Cologne. And since experienced Ruby on Rails developers are increasingly hard to find, we’ve started to offer apprenticeships, too.
One of our new partners is DailyDeal. We’ve done some beginners and advanced courses in Rails covering stuff like testing, building APIs, advanced JavaScript coding and general design and programming patterns in Ruby on Rails, etc.
Oliver Hepfner, Director Software Engineering of DailyDeal:
The training Railslove provided under the direction of Georg Leciejewski helped us understand advanced programming patterns in Ruby on Rails. Our developers were excited to get a hands-on introduction into Ruby on Rails.
Next month, we will launch a few more courses with DailyDeal and with other companies, like Adcloud GmbH in Germany. If you are interested in learning more, please contact Ralph and Georg: ralph AT railslove.com & gl AT salesking.eu & team AT railslove.com
