Like any other build process, deploying Rails applications should be a quick and easy task. You should be able to deploy everything to your server with just one command. There are several tools available for this task. One of them is Capistrano, which is probably the oldest and by far the most popular deployment tool in the Rails community. Unfortunately the documentation is still not great and a lot of very handy features are unknown to many. Only digging through the API documentation and the source code reveals them.
Sometimes, when testing your code with RSpec, you’ll notice similarities and duplication between your spec files. Most of these will involve setup that doesn’t say much about the object under test. There’s something that helps you to reduce this duplication: Custom example groups! RSpec itself (rspec-rails) uses example groups for the different types of tests for models, controllers, helpers and views. In the following I’ll show you how to use them to reduce duplication and improve your tests.
Today’s my first day as a full-time employee at flinc where I’ll mainly be doing Ruby on Rails development. I got in contact with Michael a few months back when he joined the Web Development Fulda group on Xing. We met at the meetup in september and a few days later he invited me to their offices in Dieburg. I was impressed by their product and the spirit of the team, so I agreed on doing trial work for a week. Obviously they liked me and my work and offered me a job.
When testing helper methods that use Rails’ output buffer (for example
concat) with RSpec, be sure to add this to your specs:
before (:each) do helper.output_buffer = "" end
Took me a while to figure this one out. Apparently RSpec doesn’t
initialize the output buffer and you end up with a