Fullscreen_8_3_14__5_22_AM

Working with requests tests and ajax request

Been going back and forth, disabling, enabling use_transactional_fixtures, switching to truncation and transaction.

Finally, made a working version

Features and requests tests have changed

Or rather, Capybara has changed

Capybara 2.0

To use Capybara 2.0, you need rspec-rails-2.11.1 or greater.

Capybara::DSL is added to examples in:

  • spec/features

Capybara::RSpecMatchers is added to examples in:

  • spec/features
  • spec/controllers
  • spec/views
  • spec/helpers
  • spec/mailers

Before:

Capybara 1.x

Capybara::DSL is added to examples in:

  • spec/requests # included by Capybara
  • spec/controllers

Capybara::RSpecMatchers is added to examples in:

  • spec/requests # included by Capybara
  • spec/controllers
  • spec/views
  • spec/helpers
  • spec/mailers

Found it in the doc, which is correct. As we use capybara 2.3.0 and rspec-rails 3.0.1.

Common partial for creating bootstrap dropdown

This is like scratch-your-own-itch thing. When you realize you’re doing same thing over and over again.

Instead of adding the code above in every places I need it, I move them in a partial and include like the code below.

Lolcommits for Yammer

UPDATE:
It’s been merged for release! :)

Checkout code:

git clone https://github.com/mrclmrvn/lolcommits.git
cd lolcommits
gem build lolcommits.gemspec

Go to your project directory

$ cd my_app
$ gem install ../lolcommits/lolcommits-0.5.2.gem

Enable lolcommits

lolcommits --enable

Then configure Yammer

lolcommits --config

Type yammer in the prompt, and follow the next instructions.

Post your lolcommits image in Yammer when you commit!

Example

* to be tracked, lol

Anything about programming, and a little about me (I hope)