I learned an important lesson today. The quick summary is “bundler makes freezing gems unnecessary, use ‘bundle install –deployment‘”. But for those who like a good, geeky story: I’ve been updating/upgrading/refactoring a Rails 2 project as a Rails 3 project. We’d used the method described here to ensure that developer, testing & production environments would [...]
Posted in:
Coding
by
damon
/
Tags: rails
Comments Off
Have a web service which needs requires authentication, but you’re testing a completely different part of the application? Again, FakeWeb & Regex help you out here. If you’re testing a model extended from ActiveResource by using FakeWeb, the url will look something like this: 1http://user:pass@example.com/someService To mock the request, use a regular expression like so: [...]
Posted in:
Coding
by
damon
/
Tags: fakeweb, rspec, ruby, testing
Comments Off
I’ve been using a lot of FakeWeb + Rspec for creating ActiveResource models BDD-style without hitting my RESTful source. I keep on figuring out little things with FakeWeb that I feel like I should share. When you register uri’s with FakeWeb, and you’re using regular expressions, you might be building layers of access like this: [...]
Posted in:
Coding
by
damon
/
Tags: fakeweb, ruby, testing
1 Comment
I’ve been using HAML and SASS a lot lately because it’s kind of the best thing since sliced bread and ZenCode. I’ve also been using Mathew James Taylor‘s no-quirks-mode 3 column holy grail layout because: why re-invent the wheel (or in this case the Rube Goldberg Machine that is column layout in CSS). Matthew’s code [...]
Posted in:
Coding
by
damon
/
Tags: css, haml, ruby, sass
4 Comments